Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix #7936] Mark as Lint/BooleanSymbol unsafe #7941

Merged
merged 1 commit into from May 10, 2020
Merged

[Fix #7936] Mark as Lint/BooleanSymbol unsafe #7941

merged 1 commit into from May 10, 2020

Conversation

laurmurclar
Copy link
Contributor

Fixes #7936

This PR marks Lint/BooleanSymbol as unsafe.

As mentioned in the issue, the auto-corrected code is not equivalent to the problem code and therefore can't be run safely without changing the meaning of the code.


Before submitting the PR make sure the following are checked:

  • 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.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@laurmurclar laurmurclar changed the title [Fix #7936] Mark as unsafe [Fix #7936] Mark as Lint/BooleanSymbol unsafe May 8, 2020
@laurmurclar
Copy link
Contributor Author

I'm not sure why CI failed for windows 2.6, but it doesn't look related to this change 🤔

Copy link
Member

@koic koic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change makes sense because true (false) and :true (:false) are not equivalent.

@bbatsov bbatsov merged commit e95daf9 into rubocop:master May 10, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented May 10, 2020

I agree with the proposed change as well. Thanks!

@laurmurclar laurmurclar deleted the lmc/mark-unsafe-lint-boolean-symbol branch May 11, 2020 09:12
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.

Lint/BooleanSymbol is not safe to auto-correct
3 participants