diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-08-27 18:31:01 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-09-11 18:32:00 +0300 |
commit | 2039c8280db1646845c33d6c5a74e5f23ca6f4de (patch) | |
tree | e2b3cd3012d9711cda7c6afb962ae4228d59521a /app/controllers/projects/tags_controller.rb | |
parent | 91c40973dc620430b173ea2df968587d2a708dff (diff) |
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/tags_controller.rb')
-rw-r--r-- | app/controllers/projects/tags_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index 7f2c3ca38ad..74bba97987f 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -7,6 +7,7 @@ class Projects::TagsController < Projects::ApplicationController before_action :authorize_push_code!, only: [:new, :create] before_action :authorize_admin_project!, only: [:destroy] + # rubocop: disable CodeReuse/ActiveRecord def index params[:sort] = params[:sort].presence || sort_value_recently_updated @@ -23,7 +24,9 @@ class Projects::TagsController < Projects::ApplicationController format.atom { render layout: 'xml.atom' } end end + # rubocop: enable CodeReuse/ActiveRecord + # rubocop: disable CodeReuse/ActiveRecord def show @tag = @repository.find_tag(params[:id]) @@ -32,6 +35,7 @@ class Projects::TagsController < Projects::ApplicationController @release = @project.releases.find_or_initialize_by(tag: @tag.name) @commit = @repository.commit(@tag.dereferenced_target) end + # rubocop: enable CodeReuse/ActiveRecord def create result = Tags::CreateService.new(@project, current_user) |