-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Make operator_usage_whitespace
Rule Configurable
#1013
Comments
We really need this for exactly the same reason ( |
I'd rather just see SwiftLint support vertically aligning operators instead. |
I would like to config so it accepts the formatting that can be found in Clean Code by Uncle Bob about precedence of operators.
|
@cennydavidsson I agree that case reads more nicely than a single spaces. What about this case can we detect and make an exception for, without also losing some of the valuable violations that the rule would currently catch? For example, longer variable names would reduce the readability of that code: return b*b - 4*a*c
// vs
return variableB*variableB - 4*variableA*variableC |
@jpsim I'm not sure I understand what you are asking. I would like to configure the rule to have no whitespace for operators
|
I was saying that |
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions! |
It would be nice to make
operator_usage_whitespace
rule configurable so that you can include or exclude specific operators.As an example, I prefer to vertically align my assignments and therefore would like to exclude the
=
operator. But I would like to keep all of my arithmetic nicely spaced and continue to be linted.The text was updated successfully, but these errors were encountered: