Open maratori opened 1 year ago
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.
Does the standalone linter has the same behavior?
No, the standalone linter works well if you pass all packages to it (go-check-sumtype ./...
).
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 https://github.com/golangci/golangci-lint/pull/3671#discussion_r1370424897).Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Validation