summaryrefslogtreecommitdiff
path: root/rubocop/cop
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-11-21 23:15:24 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-11-22 00:59:38 +0800
commit45568bed36095db0df94cf89a8a04458f56f33dc (patch)
treec6655290f3fbf1342650b934cdaf7de65326260a /rubocop/cop
parentffec300b9495f0fe022e777c889407433217497e (diff)
downloadgitlab-ce-45568bed36095db0df94cf89a8a04458f56f33dc.tar.gz
Updates based on feedback
Diffstat (limited to 'rubocop/cop')
-rw-r--r--rubocop/cop/module_with_instance_variables.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/rubocop/cop/module_with_instance_variables.rb b/rubocop/cop/module_with_instance_variables.rb
index 974a23bf701..9f9856e308b 100644
--- a/rubocop/cop/module_with_instance_variables.rb
+++ b/rubocop/cop/module_with_instance_variables.rb
@@ -5,7 +5,7 @@ module RuboCop
Do not use instance variables in a module. Please read this
for the rationale behind it:
- doc/development/module_with_instance_variables.md
+ https://docs.gitlab.com/ee/development/module_with_instance_variables.html
If you think the use for this is fine, please just add:
# rubocop:disable Cop/ModuleWithInstanceVariables
@@ -56,9 +56,7 @@ module RuboCop
add_offense(offense, :expression)
end
# We allow initialize method and single ivar
- elsif initialize_method?(definition) || single_ivar?(definition)
- next
- else
+ elsif !initialize_method?(definition) && !single_ivar?(definition)
definition.each_descendant(:ivar, :ivasgn) do |offense|
add_offense(offense, :expression)
end