cfssl
cfssl copied to clipboard
Github action for golangci lint has typecheck errors
Error
e.g certdb/certdb.go:5:2: could not import encoding/json (Config.Importer.Import(encoding/json) returned nil but no error) (typecheck)
typecheck cannot be disabled like other linters. Docs have some troubleshooting steps here - https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors
Have tested a few combinations locally that all have the same issue. Our lint job works with v1.57.2, but stops working after that point.
- Go 1.23 / golangci-lint v1.64
- Go 1.20 / golangci-lint v1.58
- Go 1.23 / golangci-lint v1.58
- Go 1.20 / golangci-lint v1.58
It looks like this condition is getting hit here - https://github.com/golangci/golangci-lint/blob/312fdf7a8d0516ced651630c6196da9d6053c2d7/pkg/goanalysis/runner_loadingpackage.go#L149 - but not 100% sure. There is no diff in that file between v1.57.2 and v.158.0, it could be where the packages are loaded instead.