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/presenters/merge_request_presenter.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/presenters/merge_request_presenter.rb')
-rw-r--r-- | app/presenters/merge_request_presenter.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/presenters/merge_request_presenter.rb b/app/presenters/merge_request_presenter.rb index 8c4eac3c31d..3f565b826dd 100644 --- a/app/presenters/merge_request_presenter.rb +++ b/app/presenters/merge_request_presenter.rb @@ -142,6 +142,7 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated end def assign_to_closing_issues_link + # rubocop: disable CodeReuse/ServiceClass issues = MergeRequests::AssignIssuesService.new(project, current_user, merge_request: merge_request, @@ -152,6 +153,7 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated pluralize_this_issue = issues.count > 1 ? "these issues" : "this issue" link_to "Assign yourself to #{pluralize_this_issue}", path, method: :post end + # rubocop: enable CodeReuse/ServiceClass end def can_revert_on_current_merge_request? @@ -202,7 +204,9 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated end def conflicts + # rubocop: disable CodeReuse/ServiceClass @conflicts ||= MergeRequests::Conflicts::ListService.new(merge_request) + # rubocop: enable CodeReuse/ServiceClass end def closing_issues |