Skip to content

Commit

Permalink
Suppress RuboCop's offense
Browse files Browse the repository at this point in the history
Follow rubocop/rubocop#8122.

This commit suppresses the following RuboCop's offense.

```console
% bundle exec rake
(snip)

Offenses:

lib/rubocop/cop/mixin/index_method.rb:122:80: W:
Lint/RedundantCopDisableDirective: Unnecessary disabling of
Metrics/BlockLength.
      Autocorrection = Struct.new(:match, :block_node, :leading,
      :trailing) do # rubocop:disable Metrics/BlockLength
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

187 files inspected, 1 offense detected, 1 offense auto-correctable
RuboCop failed!
```
  • Loading branch information
koic committed Sep 30, 2020
1 parent 020a96d commit c106f5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/mixin/index_method.rb
Expand Up @@ -119,7 +119,7 @@ def noop_transformation?
end

# Internal helper class to hold autocorrect data
Autocorrection = Struct.new(:match, :block_node, :leading, :trailing) do # rubocop:disable Metrics/BlockLength
Autocorrection = Struct.new(:match, :block_node, :leading, :trailing) do
def self.from_each_with_object(node, match)
new(match, node, 0, 0)
end
Expand Down

0 comments on commit c106f5b

Please sign in to comment.