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

Enforce require_parentheses_when_complex style for ternaries #30

Merged
merged 1 commit into from Jul 13, 2023

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Jul 13, 2023

From the cops documentation for the good style:

foo = bar? ? a : b
foo = bar.baz? ? a : b
foo = (bar && baz) ? a : b

From the cops documentation for the good style:

```ruby
foo = bar? ? a : b
foo = bar.baz? ? a : b
foo = (bar && baz) ? a : b
```
Copy link
Member

@bastelfreak bastelfreak left a comment

Choose a reason for hiding this comment

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

fine by me. should we release that as a backwards-incompatible release? Then modules won't pull it in and break, but dependabot will raise PRs.

@zilchms
Copy link

zilchms commented Jul 13, 2023

seems like a good idea to release it as backwards-incompatible

@ekohl
Copy link
Member Author

ekohl commented Jul 13, 2023

It is a style change that can affect codebases, so semver wise 👍 to make it a major version bump.

@bastelfreak bastelfreak merged commit 103b6ef into voxpupuli:master Jul 13, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants