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

7709 redundant condition range #7738

Merged
merged 2 commits into from Feb 22, 2020

Conversation

rrosenblum
Copy link
Contributor

This fixes #7709. The solution is to wrap the range in parentheses. This did make me wonder whether it would be valuable to have a lint cop that checks for double pipe or followed by a range.

Copy link
Collaborator

@Drenmi Drenmi left a comment

Choose a reason for hiding this comment

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

Nice! 🎉

CHANGELOG.md Outdated Show resolved Hide resolved
lib/rubocop/cop/style/redundant_condition.rb Outdated Show resolved Hide resolved
spec/rubocop/cop/style/redundant_condition_spec.rb Outdated Show resolved Hide resolved
spec/rubocop/cop/style/redundant_condition_spec.rb Outdated Show resolved Hide resolved
spec/rubocop/cop/style/redundant_condition_spec.rb Outdated Show resolved Hide resolved
spec/rubocop/cop/style/redundant_condition_spec.rb Outdated Show resolved Hide resolved
@rrosenblum
Copy link
Contributor Author

Wow, I really had trouble spelling yesterday...

@koic koic merged commit bad4b8a into rubocop:master Feb 22, 2020
@koic
Copy link
Member

koic commented Feb 22, 2020

Thank you!

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.

Style/RedundantCondition incorrectly reports error with range in ternary
3 participants