diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-07-12 02:29:33 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-09-18 21:23:45 +0800 |
commit | 9ae92b8caa6c11d8860f86b7d6378062215d1b72 (patch) | |
tree | 06b7416abad46cb1dd44c19a18a7e40caed30e15 /app/services/concerns/issues | |
parent | 4cadf22e208e3be401824f43ab13d5e6f2ff6465 (diff) | |
download | gitlab-ce-9ae92b8caa6c11d8860f86b7d6378062215d1b72.tar.gz |
Add cop to make sure we don't use ivar in a module
Diffstat (limited to 'app/services/concerns/issues')
-rw-r--r-- | app/services/concerns/issues/resolve_discussions.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/services/concerns/issues/resolve_discussions.rb b/app/services/concerns/issues/resolve_discussions.rb index 7d45b4aa26a..df78ffbb6bd 100644 --- a/app/services/concerns/issues/resolve_discussions.rb +++ b/app/services/concerns/issues/resolve_discussions.rb @@ -2,11 +2,13 @@ module Issues module ResolveDiscussions attr_reader :merge_request_to_resolve_discussions_of_iid, :discussion_to_resolve_id + # rubocop:disable Cop/ModuleWithInstanceVariables def filter_resolve_discussion_params @merge_request_to_resolve_discussions_of_iid ||= params.delete(:merge_request_to_resolve_discussions_of) @discussion_to_resolve_id ||= params.delete(:discussion_to_resolve) end + # rubocop:disable Cop/ModuleWithInstanceVariables def merge_request_to_resolve_discussions_of return @merge_request_to_resolve_discussions_of if defined?(@merge_request_to_resolve_discussions_of) @@ -15,6 +17,7 @@ module Issues .find_by(iid: merge_request_to_resolve_discussions_of_iid) end + # rubocop:disable Cop/ModuleWithInstanceVariables def discussions_to_resolve return [] unless merge_request_to_resolve_discussions_of |