A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rubocop/rubocop/issues/14205 below:

False negatives in `Style/SafeNavigation` · Issue #14205 · rubocop/rubocop · GitHub

Style/SafeNavigation seems to glance over many common scenarios. Consider:

user.nil? ? nil : user.name                # ✅ Offense found
result = user.nil? ? nil : user.name       # ✅ Offense found
puts(user.nil? ? nil : user.name)          # ❌
results << (user.nil? ? nil : user.name)   # ❌
results[0] = user.nil? ? nil : user.name   # ❌
1.75.6 (using Parser 3.3.8.0, Prism 1.4.0, rubocop-ast 1.44.1, analyzing as Ruby 3.3, running on ruby 3.3.2) [x86_64-darwin24]
  - rubocop-minitest 0.38.0
  - rubocop-performance 1.25.0
  - rubocop-rails 2.31.0
  - rubocop-factory_bot 2.27.1

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4