Open vkuzmin-uber opened 6 years ago
There is no code to send a patch against yet, as we have no equivalent to golint. I do plan on writing and releasing stylecheck soon, but first as part of the Staticcheck Pro branch. I'll keep this issue in mind when working on the rule set.
Can you please clarify, what is Statickcheck Pro? Is it still Open Source branch?
This is still a great idea.
@dominikh what do you say?
Honestly, I'm undecided on the matter. I'm not convinced that it is worth it.
@dominikh, as a data point, making sure that documentation is composed of actual, human-readable sentences and not just stuck-together words is one of the things that I have to spend quite a bit of time when reviewing code from junior devs. So having some automated help, even in the aggressive
group, would be nice.
Originally it was proposed at golint https://github.com/golang/lint/issues/374 and I sent appropriate pull request. Proposal is
"There is a rule https://github.com/golang/go/wiki/CodeReviewComments#comment-sentences. Comments should begin with the name of the thing being described and end in a period. Note that there are other symbols except a period that can be a valid end of sentence (at least !, ?). Apart from there are many tools that use comments to mark types and methods (like easyjson:json and golint's MATCH)."
Unfortunately golint's Issue was closed today and I didn't receive enough feedback to improve it and eventually get it committed. I talked to my colleagues and decided to try to get it at staticcheck.
We use this tool, this is probably going to become our only default linter. I know that you are working on it actively now.
Let me know, if you pre-approve it, I am willing to work on patch and submit a pull request.