Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/gofmt: add missing space if any in beginning of comment #30540
What version of Go are you using (
A similar proposal here #27949 which has been rejected. On the same vein, since the language spec does not say anything about what goes inside comments, I don't think gofmt should mess with it.
There are also valid comments like
/cc @griesemer for decision.
What @agnivade said. Also, what about comments such as
I agree that it would be nice if gofmt would "clean up" messy comments. In fact it already does try to align stars in comments such as
/* bla bla bla * ... * ... */
but it doesn't always work and it's not clear it was a good idea in the first place. I'm hesitant to interfere more with the contents of comments at this point.
Thanks for the suggestion, but I'd rather not add another somewhat ad-hoc heuristic. There will be just too many exceptions to the rule.