New rules for leading spaces of binary operators #263
Merged
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)