summaryrefslogtreecommitdiff
path: root/rubocop/cop/gitlab/module_with_instance_variables.rb
diff options
context:
space:
mode:
Diffstat (limited to 'rubocop/cop/gitlab/module_with_instance_variables.rb')
-rw-r--r--rubocop/cop/gitlab/module_with_instance_variables.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/gitlab/module_with_instance_variables.rb b/rubocop/cop/gitlab/module_with_instance_variables.rb
index 5c9cde98512..dd8bd2dfdf0 100644
--- a/rubocop/cop/gitlab/module_with_instance_variables.rb
+++ b/rubocop/cop/gitlab/module_with_instance_variables.rb
@@ -30,12 +30,12 @@ module RuboCop
if only_ivar_or_assignment?(definition)
# We don't allow if any other ivar is used
definition.each_descendant(:ivar) do |offense|
- add_offense(offense, :expression)
+ add_offense(offense, location: :expression)
end
# We allow initialize method and single ivar
elsif !initialize_method?(definition) && !single_ivar?(definition)
definition.each_descendant(:ivar, :ivasgn) do |offense|
- add_offense(offense, :expression)
+ add_offense(offense, location: :expression)
end
end
end