Skip to content

Commit

Permalink
[Fix #6972] Fix a false positive for Style/MixinUsage
Browse files Browse the repository at this point in the history
Fixes #6972

This PR fixes a false positive for `Style/MixinUsage` when using
inside block and `if` condition is after `include`.
  • Loading branch information
koic committed Apr 30, 2019
1 parent e22e080 commit 9723b47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/ast/node/mixin/method_dispatch_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def binary_operation?

def_node_matcher :macro_scope?, <<-PATTERN
{^{({sclass class module block} ...) class_constructor?}
^^{({sclass class module block} ... (begin ...)) class_constructor?}
^^{({sclass class module block} ... ({begin if} ...)) class_constructor?}
^#macro_kwbegin_wrapper?
#root_node?}
PATTERN
Expand Down

0 comments on commit 9723b47

Please sign in to comment.