diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-11-21 23:15:24 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-11-22 00:59:38 +0800 |
commit | 45568bed36095db0df94cf89a8a04458f56f33dc (patch) | |
tree | c6655290f3fbf1342650b934cdaf7de65326260a /rubocop/cop | |
parent | ffec300b9495f0fe022e777c889407433217497e (diff) | |
download | gitlab-ce-45568bed36095db0df94cf89a8a04458f56f33dc.tar.gz |
Updates based on feedback
Diffstat (limited to 'rubocop/cop')
-rw-r--r-- | rubocop/cop/module_with_instance_variables.rb | 6 |
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 |