Skip to content
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

Github action for golangci lint has typecheck errors #1411

Open
mitch292 opened this issue Feb 10, 2025 · 1 comment
Open

Github action for golangci lint has typecheck errors #1411

mitch292 opened this issue Feb 10, 2025 · 1 comment
Labels
github_actions Pull requests that update GitHub Actions code

Comments

@mitch292
Copy link
Contributor

mitch292 commented Feb 10, 2025

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 mitch292 added the build label Feb 10, 2025
@mitch292 mitch292 added github_actions Pull requests that update GitHub Actions code and removed build labels Feb 10, 2025
@mitch292
Copy link
Contributor Author

mitch292 commented Feb 14, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

No branches or pull requests

1 participant