diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-08-27 17:31:01 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-09-11 17:32:00 +0200 |
commit | 2039c8280db1646845c33d6c5a74e5f23ca6f4de (patch) | |
tree | e2b3cd3012d9711cda7c6afb962ae4228d59521a /app/controllers/projects/commit_controller.rb | |
parent | 91c40973dc620430b173ea2df968587d2a708dff (diff) | |
download | gitlab-ce-2039c8280db1646845c33d6c5a74e5f23ca6f4de.tar.gz |
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 53637780a07..81f375875b2 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -38,6 +38,7 @@ class Projects::CommitController < Projects::ApplicationController render_diff_for_path(@commit.diffs(diff_options)) end + # rubocop: disable CodeReuse/ActiveRecord def pipelines @pipelines = @commit.pipelines.order(id: :desc) @pipelines = @pipelines.where(ref: params[:ref]) if params[:ref] @@ -58,6 +59,7 @@ class Projects::CommitController < Projects::ApplicationController end end end + # rubocop: enable CodeReuse/ActiveRecord def merge_requests @merge_requests = @commit.merge_requests.map do |mr| @@ -144,6 +146,7 @@ class Projects::CommitController < Projects::ApplicationController @environment = EnvironmentsFinder.new(@project, current_user, commit: @commit).execute.last end + # rubocop: disable CodeReuse/ActiveRecord def define_note_vars @noteable = @commit @note = @project.build_commit_note(commit) @@ -176,6 +179,7 @@ class Projects::CommitController < Projects::ApplicationController @notes = (@grouped_diff_discussions.values.flatten + @discussions).flat_map(&:notes) @notes = prepare_notes_for_rendering(@notes, @commit) end + # rubocop: enable CodeReuse/ActiveRecord def assign_change_commit_vars @start_branch = params[:start_branch] |