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

Refactor Style/RedundantParentheses into more general ParenthesesAroundCondition rule #302

Merged
merged 4 commits into from
Nov 19, 2022

Conversation

Sija
Copy link
Member

@Sija Sija commented Nov 14, 2022

This renames the rule to more fitting ParenthesesAroundCondition and replaces exclude_assignments option with allow_safe_assignment, which if set enforces parens around assignments, and strips them otherwise.

Refs #140

@Sija Sija added the rule label Nov 14, 2022
@Sija Sija added this to the 1.3.1 milestone Nov 14, 2022
@Sija Sija requested a review from veelenga November 14, 2022 15:31
@Sija Sija self-assigned this Nov 14, 2022
@veelenga veelenga modified the milestones: 1.3.1, v1.4.0 Nov 15, 2022
@Sija Sija force-pushed the Sija/style-parenthesized-assignments branch from 71e88b7 to eabe463 Compare November 18, 2022 04:27
@Sija Sija changed the title Add Style/ParenthesizedAssignments rule Refactor Style/RedundantParentheses to support enforcing parens around assignments Nov 18, 2022
@Sija Sija marked this pull request as ready for review November 18, 2022 04:32
@Sija Sija requested a review from veelenga November 18, 2022 20:01
@Sija Sija force-pushed the Sija/style-parenthesized-assignments branch from e9d893d to 6fb61c0 Compare November 18, 2022 20:04
Also rename the option: `parenthesized_assignments` -> `allow_safe_assignment`
@Sija Sija force-pushed the Sija/style-parenthesized-assignments branch from 6fb61c0 to 5ee4074 Compare November 18, 2022 20:06
Copy link
Member

@veelenga veelenga left a comment

Choose a reason for hiding this comment

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

The names of the files should be changed too. The rest looks good to me. Thanks for dealing with this

Copy link
Member

@veelenga veelenga left a comment

Choose a reason for hiding this comment

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

Hm actually reviewed it on mobile and haven't noticed that file names are properly changed))

LGTM

@Sija Sija merged commit a3e5f2d into master Nov 19, 2022
@Sija Sija deleted the Sija/style-parenthesized-assignments branch November 19, 2022 23:40
@Sija Sija changed the title Refactor Style/RedundantParentheses to support enforcing parens around assignments Refactor Style/RedundantParentheses into more general ParenthesesAroundCondition rule Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants