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
x/lint: golint does not recognize Unwrap methods #36997
Comments
Could you provide more information for this issue? Could you provide an example of the code that produced the error, preferably as a Go playground link? |
Sure, sorry. https://play.golang.org/p/8Zy-WTR7J9B
Note how there is no warning about the Error method not having a comment since it is a well know interface. |
Here is the code that should be updated: Thanks |
Thank you for the clarification. |
/cc @ianthehat @matloob |
Lint is really noisy and my preference is to keep its behavior fixed. If you want to send a CL to add Unwrap to the list of known methods I'd be okay with it. |
Thank you for submitting this issue! As per #38968, we are freezing and deprecating golint. There's no drop-in replacement to golint per se, but you should find that Staticcheck works well in encouraging good Go code, much like golint did in the past, since it also includes style checks. There's always If you would like to contribute further, I'd encourage you to engage Staticcheck's issue tracker or look at vet's open issues, as they are both actively maintained. If you have an idea that doesn't fit into either of those tools, you could look at other Go linters, or write your own - these days it's fairly straightforward with go/analysis. To help avoid confusion, I'm closing all golint issues before we freeze its repository. If you have any feedback, you can leave a comment on the proposal thread where it was decided to deprecate golint - though note that the proposal has been accepted for nearly a year. Thanks! |
Thanks for the notification. |
golint
does not complain if a method implementing know interfaces is not documented.However when I define the
Unwrap
method, it complains:By the way, how I'm supposed to document the method?
or
?
The text was updated successfully, but these errors were encountered: