-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Welcome
- Yes, I've searched similar issues on GitHub and didn't find any.
- I agree to follow this project's Code of Conduct
How did you install golangci-lint?
Docker
Your feature request related to a problem? Please describe
There currently seems to be no way to run the errcheck linter with its verbose flag enabled. This is sometimes frustrating when trying to update the exclude list, because by default, there is no indication from the linter as to what specific package/type/function triggered the warning.
The difference is that without verbose mode the output looks like this:
Error return value of `io.Close` is not checked (errcheck)
defer io.Close(ctx)
Which give a good hint, but it's still obtuse. was it triggered with a pointer receiver? Is it an interface and I need to exclude all possible things which satisfy the interface? Which package is it in? Which type is it? etc...
With verbose mode (running errcheck manually), i get this:
(*github.com/username/project/internal/mypackage.MyType).Close defer io.Close(ctx)
Where that first bit is precisely what I'd want to add to my exclude list. I'd prefer not to have run errcheck manually to get this information.
Describe the solution you'd like
My proposal is to add:
settings:
errcheck:
verbose: true
as an option to the .golangci.yaml
file, and have it give the verbose output of the tool.
Describe alternatives you've considered
I currently manually re-run errcheck directly from the command line to get the information I need from the tool :-(.
Additional context
No response
Supporter
- I am a sponsor through GitHub or OpenCollective