-
Notifications
You must be signed in to change notification settings - Fork 234
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
Don't insert unnecessary (double) space for // inline comments #868
Comments
FWIW, offsetting EOL comments by 2 spaces is just a typographic/style choice that isn't any weirder than the others 🙂 As of #776, it can be controlled by the |
Across a bunch languages I worked with this is the first time seeing this so it’s at least uncommon in that sense. Good to hear it’s configurable now but pretty the downside nowadays being that the releases are tied to swift hm… so it means 6.1 for this I think, that’s fine. We can probably consider this solved by that configuration option, though I’d argue it’s definitely an unprecedented default behavior. I’ve never seen a language or style guide suggest this and I’ve worked with quite a few languages. It’s one more “swift is weird” that we’ll keep getting told as we migrate more and more developers from other ecosystems - so that’s why I think it matters, as we already have an uphill battle with such folks coming over sometimes 💭 |
Synced to Apple’s issue tracker as rdar://138912225 |
Heh, with further reading I found this is specifically the Google-way https://google.github.io/swift/ I'd be iffy about imposing that specific rule... but since it's configurable I guess we can leave it at that. |
If we can get the entire community to agree on any set of rules, I'm happy to change them 😅 |
Let’s close this issue because we have configuration option for it (#776). |
Swift-format has this really weird behavior of adding an "extra" space for inline comments:
from:
to
This is pretty weird and should not be happening.
The text was updated successfully, but these errors were encountered: