Skip to content

Commit

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

This commit suppresses the following RuboCop's offense.

```console
% bundle exec rubocop
(snip)

Offenses:

lib/rubocop/cop/rails/save_bang.rb:141:57: W:
Lint/RedundantCopDisableDirective: Unnecessary disabling of
Metrics/PerceivedComplexity.
        # rubocop:disable Metrics/CyclomaticComplexity,
        Metrics/PerceivedComplexity
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^

181 files inspected, 1 offense detected
RuboCop failed!
```
  • Loading branch information
koic committed Jul 30, 2020
1 parent 30d433f commit d9a41e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rubocop/cop/rails/save_bang.rb
Expand Up @@ -138,7 +138,7 @@ def check_assignment(assignment)
add_offense_for_node(node, CREATE_MSG)
end

# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
# rubocop:disable Metrics/CyclomaticComplexity
def on_send(node)
return unless persist_method?(node)
return if return_value_assigned?(node)
Expand All @@ -150,7 +150,7 @@ def on_send(node)

add_offense_for_node(node)
end
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
# rubocop:enable Metrics/CyclomaticComplexity
alias on_csend on_send

def autocorrect(node)
Expand Down

0 comments on commit d9a41e5

Please sign in to comment.