BurntSushi / wingo

A fully-featured window manager written in Go.
Do What The F*ck You Want To Public License
1k stars 86 forks source link

Fix function comments based on best practices from Effective Go #139

Closed BlakeMScurr closed 5 years ago

BlakeMScurr commented 5 years ago

Every exported function in a program should have a doc comment. The first sentence should be a summary that starts with the name being declared. From effective go.

I generated this with CodeLingo and I'm keen to get some feedback, but this is automated so feel free to close it and just say opt out to opt out of future CodeLingo outreach PRs.

BlakeMScurr commented 5 years ago

It looks like there are several fix ups that update the tense and read well like this, this, and this.

However, other changes like this basically just add colons to conform to the standard and arguabl make comments less readable. Let me know if you think they're valuable! :smile:

Also, I noted that this should really have been smart enough to catch that Geom is the old function name, and this didn't need to add a colon. Working on fixes!

BurntSushi commented 5 years ago

The fact that this change was generated automatically is pretty cool, and I can see how it would be useful. However, I'm fine with the status quo. The changes that add colons, for example, just to conform the standard don't seem worth it.