Documentation ¶
Overview ¶
Package internal/checker defines various implementation helpers for the singlechecker and multichecker packages, which provide the complete main function for an analysis driver executable based on go/packages.
(Note: it is not used by the public 'checker' package, since the latter provides a set of pure functions for use as building blocks.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Debug is a set of single-letter flags: // // f show [f]acts as they are created // p disable [p]arallel execution of analyzers // s do additional [s]anity checks on fact types and serialization // t show [t]iming info (NB: use 'p' flag to avoid GC/scheduler noise) // v show [v]erbose logging // Debug = "" // Log files for optional performance tracing. CPUProfile, MemProfile, Trace string // IncludeTests indicates whether test files should be analyzed too. IncludeTests = true // Fix determines whether to apply all suggested fixes. Fix bool )
Functions ¶
func RegisterFlags ¶
func RegisterFlags()
RegisterFlags registers command-line flags used by the analysis driver.
func Run ¶
Run loads the packages specified by args using go/packages, then applies the specified analyzers to them. Analysis flags must already have been set. Analyzers must be valid according to analysis.Validate. It provides most of the logic for the main functions of both the singlechecker and the multi-analysis commands. It returns the appropriate exit code.
Types ¶
This section is empty.