-
Notifications
You must be signed in to change notification settings - Fork 38
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
Rule to remove superfluous brackets #617
Comments
If we could determine which ones are superfluous.... if (a = '1') and (b = '0') then those are extra, but... if (a = '1' and b = '0') and (c = '0' or d = '1') then ...those are not. we would need to figure out the rules. |
I think that my example is an obvious case, but your examples are less so, in the sense that the brackets do provide a documentation grouping benefit and some people prefer that explicit style |
This ticket is incorrectly assigned as User Feedback? |
Hey @imd1, We should pick this back up. I was thinking that you could use logical operators to determine which parenthesis are superfluous. if (a = '1' and b = '0') and (c = '0' or d = '1') then The parenthesis are not superflous because of the logic operator. This would probably be true of logic operators also. Is the rule simply a single word enclosed by parenthesis? Like in your example? We could always start the rule out at that level and then add to it as we need to. --Jeremy |
For example, the brackets in the following snippet are superfluous, could there be a rule to remove them?
The text was updated successfully, but these errors were encountered: