Closed
Description
- Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've included all information below (version, config, etc).
- Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)
Description of the problem
Release v1.40.0 had an issue with govet that leads to panics. When this panic occurred, the linter would appear to pass. The panic was logged to the screen based on the behavior described at #1537 (comment). In my own case, golangci-lint runs via pre-commit.com so the panic logged in the output wasn't even visible. This behavior created a false sense of security when upgrading the golangci-lint version in a build, leading me to believe that the new version was good even though we had taken a step backward in verifying the areas covered by govet
. I think golangci-lint should return a nonzero error code.
At
golangci-lint/pkg/lint/runner.go
Line 201 in 9cb902c
Verbose output of running
WARN [linters context] Panic: unusedwrite: package "main" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildssa.SSA: goroutine 20325 [running]: