Skip to content

Commit

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

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

Offenses:

lib/rubocop/cop/rails/save_bang.rb:247:11: C: [Corrected] InternalAffairs/OperatorKeyword: Use node.operator_keyword?.
node.or_type? || node.and_type? || single_negative?(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
  • Loading branch information
koic committed Nov 15, 2024
1 parent ad3287a commit 879f3b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rails/save_bang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def in_condition_or_compound_boolean?(node)
end

def operator_or_single_negative?(node)
node.or_type? || node.and_type? || single_negative?(node)
node.operator_keyword? || single_negative?(node)
end

def conditional?(parent)
Expand Down

0 comments on commit 879f3b9

Please sign in to comment.