cmd/vet: export list of analysis passes used by vet #35487
Labels
Analysis
Issues related to static analysis (vet, x/tools/go/analysis)
FeatureRequest
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was looking to include all the same analysis passes of
go vet
into my own main package usingmultichecker
similar to the pattern that I saw @FiloSottile use in FiloSottile/mkcert@82ea753.What did you expect to see?
I expected to find an exported slice/list of analysis passes that vet uses so that it is easy to build multicheckers that build on-top of vet.
What did you see instead?
I saw that in go vet's main function is where the list of analysis passes is defined and that folks are just copying that list when building multichecker's that run additional checks on-top of vet's checks.
go/src/cmd/vet/main.go
Lines 35 to 58 in 78d4560
Ask
Could we export in a package inside the
go
repo, or inside thetools
repo, a slice that holds the analysis passes that vet will run, and have vet reference that so that it can be referenced by other tools?I'm able to submit a change doing this if this would be welcomed.
The text was updated successfully, but these errors were encountered: