-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
gochecksumtype
: works only inside one package
#4158
Comments
Hello, there is something missing in your report: Does the standalone linter has the same behavior? After it's not unexpected based on how golangci-lint analyzes things. |
No, the standalone linter works well if you pass all packages to it ( |
Analysis drivers like golangci-lint may leverage the analysis framework's fact interface to avoid rerunning analysis on packages that are not either directly or indirectly modified since the last run. What this means is that an analyzer should:
It looks like go-check-sumtype does not leverage facts at all. So it seems incompatible golangci-lint's caching mechanism unless rewritten appropriately such as in exhaustive. |
Welcome
Description of the problem
gochecksumtype
doesn't report missing cases if the sum type is declared in one package and the type switch is in a different package (see #3671 (comment)).Version of golangci-lint
Configuration
# paste configuration file or CLI flags here
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
/decl/decl.go
/usage/usage.go
Validation
The text was updated successfully, but these errors were encountered: