-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
New rules for leading spaces of binary operators #263
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@so298 Nice one :) I notice a couple of little things.
|
Thank you for your comment! I agree with the idea that these rules are enabled in the style ruleset. Also, I fixed spelling mistake and added my name to |
pr263 Add the new `style_*_leading_space` rules to ruleset-style.
@DaveMcEwan |
Thank you for your contribution. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, @dalance!
I added some new rules for leading spaces of binary operators.
The names of the new rules are the following:
style_operator_arithmetic_leading_space
style_operator_boolean_leading_space
style_operator_integer_leading_space
Each of these rules corresponds to the following existing rules.
style_operator_arithmetic
style_operator_boolean
style_operator_integer
These existing rules are for the number of following spaces and do not support leading spaces.
For example:
When I give the following SystemVerilog code to the linter with
style_operator_arithmetic
rule enabled,I expect the result that says the numbers of the leading spaces of
*
and+
operators are not appropriate, but no message will be found actually because this existing rule do not consider leading space.With the new rules I implemeted, this message will be found for the sample code.
The new rules only consider the number of leading spaces. (do not consider following spaces)