Skip to content

Commit

Permalink
Suppress a RuboCop's offense
Browse files Browse the repository at this point in the history
This commit suppresses the following offense:

```console
$ bundle exec rubocop -a
(snip)

Offenses:

lib/rubocop/ast/traversal.rb:41:50: W: [Corrected] Lint/RedundantCopDisableDirective:
Unnecessary disabling of Style/EvalWithLocation.
          module_eval(<<~RUBY, __FILE__, lineno) # rubocop:disable Style/EvalWithLocation
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
  • Loading branch information
koic committed Mar 18, 2024
1 parent 00faca9 commit 347df06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/ast/traversal.rb
Expand Up @@ -38,7 +38,7 @@ def def_callback(type, *signature,
body: self.body(signature, arity_check))
type, *aliases = type
lineno = caller_locations(1, 1).first.lineno
module_eval(<<~RUBY, __FILE__, lineno) # rubocop:disable Style/EvalWithLocation
module_eval(<<~RUBY, __FILE__, lineno)
def on_#{type}(node) # def on_send(node)
#{body} # # body ...
nil # nil
Expand Down

0 comments on commit 347df06

Please sign in to comment.