cfssl icon indicating copy to clipboard operation
cfssl copied to clipboard

Github action for golangci lint has typecheck errors

Open mitch292 opened this issue 9 months ago • 1 comments

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

mitch292 avatar Feb 10 '25 18:02 mitch292

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.

mitch292 avatar Feb 14 '25 14:02 mitch292