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
Offenses:

lib/rubocop/cop/rails/squished_sql_heredocs.rb:71:49: W: [Correctable] Lint/SafeNavigationConsistency: Use . instead of unnecessary &..
          node.parent&.send_type? && node.parent&.method?(:squish)
                                                ^^
lib/rubocop/cop/rails/where_range.rb:92:43: W: [Correctable] Lint/SafeNavigationConsistency: Use . instead of unnecessary &..
          receiver&.send_type? && receiver&.method?(:where)
                                          ^^

296 files inspected, 2 offenses detected, 2 offenses autocorrectable
```
  • Loading branch information
koic committed Oct 14, 2024
1 parent 209cc09 commit a413fe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rails/squished_sql_heredocs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def sql_heredoc?(node)
end

def using_squish?(node)
node.parent&.send_type? && node.parent&.method?(:squish)
node.parent&.send_type? && node.parent.method?(:squish)
end

def singleline_comments_present?(node)
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rails/where_range.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def on_send(node)

def where_not?(node)
receiver = node.receiver
receiver&.send_type? && receiver&.method?(:where)
receiver&.send_type? && receiver.method?(:where)
end

# rubocop:disable Metrics
Expand Down

0 comments on commit a413fe6

Please sign in to comment.