Skip to content

Commit

Permalink
Suppress new RuboCop offenses
Browse files Browse the repository at this point in the history
This commit suppresses the following new RuboCop offenses:

```console
$ bundle exec rubocop
(snip)

lib/rubocop/cop/performance/sum.rb:162:41: W: [Correctable] Lint/SafeNavigationConsistency: Use . instead of unnecessary &..
          receiver&.literal? && receiver&.array_type?
                                        ^^

118 files inspected, 1 offense detected, 1 offense autocorrectable
RuboCop failed!
```
  • Loading branch information
koic committed Oct 14, 2024
1 parent fb0a21b commit 1ae01bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/performance/sum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def empty_array_literal?(node)

def array_literal?(node)
receiver = node.children.first
receiver&.literal? && receiver&.array_type?
receiver&.literal? && receiver.array_type?
end

def autocorrect(corrector, init, range)
Expand Down

0 comments on commit 1ae01bc

Please sign in to comment.