-
Notifications
You must be signed in to change notification settings - Fork 247
Undocumented rule for adding spaces before inline comments? #525
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
Comments
I also think there should be a configurable rule for this in order to be able to align this with other formatters in multi-language codebases. |
Agreed, to me the current behaviour looks like an error. Why randomly enforce two spaces? |
I'm happy to review a PR that adds a configuration setting to change the number of spaces enforced before an end-of-line comment if someone wants to implement it. I think it should be a fairly straightforward change to |
Tracked in Apple’s issue tracker as rdar://126948345 |
For anyone finding this before it gets released, @dduan added a PR to make this configurable #776 with
Previously it was hardcoded to |
Closing as fixed by #776. |
In our codebase, the linter complains about hundreds of instances such as:
and
It is always about having only 1 space before the inline comment forward slashes (
//
). The linter wants to have 2 spaces, as inWhy ? And what undocumented rule is enforcing that? And why is it undocumented?
The text was updated successfully, but these errors were encountered: