Skip to content

Fix a false positive for Style/NilComparison without receiver and EnforcedStyle: comparison#12768

Merged
koic merged 1 commit intorubocop:masterfrom
Earlopain:fix-false-positive-for-style-nil-comparison
Mar 10, 2024
Merged

Fix a false positive for Style/NilComparison without receiver and EnforcedStyle: comparison#12768
koic merged 1 commit intorubocop:masterfrom
Earlopain:fix-false-positive-for-style-nil-comparison

Conversation

@Earlopain
Copy link
Contributor

This would previously show an offense and get into an infinite loop during correction.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@Earlopain Earlopain force-pushed the fix-false-positive-for-style-nil-comparison branch from 12ec7a4 to c1c128f Compare March 10, 2024 11:58
@Earlopain
Copy link
Contributor Author

This is broken on prism 0.24. I'm assuming this is the same as all the other tests that have this comment. I confirmed that the test passes against prism main.

@Earlopain Earlopain force-pushed the fix-false-positive-for-style-nil-comparison branch from c1c128f to aa97673 Compare March 10, 2024 13:59
@koic koic merged commit 1281bf0 into rubocop:master Mar 10, 2024
@Earlopain Earlopain deleted the fix-false-positive-for-style-nil-comparison branch March 10, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants