x/tools/go/analysis: running the same analysis with different sets of flags #32155
Labels
Analysis
Issues related to static analysis (vet, x/tools/go/analysis)
FeatureRequest
Issues asking for a new feature that does not need a proposal.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
By convention, analyses are provided as singletons in package variables, a la
var Analysis = &analysis.Analyzer{...}
. Furthermore, analysis.Analyzer stores a flag.FlagSet for providing options to the analysis. However, this combination of singleton and FlagSet makes it difficult to run one analysis multiple times concurrently with different options. This becomes especially problematic when multiple independent tools coexist in the same address space and want to use the same analysis with different options, as they won't be coordinating with each other.As far as I am aware, there is no suitable workaround.
/cc @matloob
The text was updated successfully, but these errors were encountered: