-
Notifications
You must be signed in to change notification settings - Fork 18k
all: reduce golint errors on standard library #21779
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
At least two reasons:
|
I agree that the rule is often too agressive. For example, I filed golang/lint#218 a while ago. @willfaught if you see any warnings of it that make sense (such as inconsistent method receiver names) and want to send a patch, by all means do so. But I don't think an umbrella issue to get golint happy with |
Makes sense. Why not update it within compat limits?
I find it helpful. For example, in the rare case where it's pretty clear what it does, like a If go/ast and go/types followed this rule, for example, it would be much clearer how to use them. I've had to do numerous experiments to understand how they work, which should have just been documented. |
Feel free to contribute changes to clean-up crufty code. For common interfaces, I believe it should be a tooling issue to make it clear that a type satisfies an interface and that the primary documentation should be on the interface. See #20131. |
Is there anything in particular that is actionable here? Otherwise, we can just close this issue. Submissions to cleanup of old code can happen whenever. Documentation changes can also happen whenever, but I personally would like to see something like #20131 happen first before blindly putting something like "MethodX implements InterfaceX" on everything. |
To the extent that the work that this calls for is specific, yes: make the stdlib pass golint as much as possible. Any PRs for that work could refer to this issue for justification ("Fixes #21779"). |
Change https://golang.org/cl/139097 mentions this issue: |
Change https://golang.org/cl/151017 mentions this issue: |
In light of #38968, we should probably close this issue. Perhaps open new issues for fixing specific classes of problems caught by other, well-maintained static analysis tools. Or just send patches :) |
#45630 was also a duplicate, so I've closed it. |
Thanks. I'm going to close this issue as well. Let's address specific issues as we see them. |
I was surprised to learn that the stdlib doesn't conform very well to golint. Example:
Shouldn't it, at least where it won't break compat?
The text was updated successfully, but these errors were encountered: