- Package analysis defines an interface for modular static analysis of Go code, where an Analyzer inspects one package at a time and can save information from lower-level packages for use in higher-level ones.
- The core type Analyzer includes fields like Name, Doc, Run function, Requires (dependencies on other analyzers), ResultType, and FactTypes, enabling composition and reuse.
- A Pass represents a single analysis unit, providing type info, syntax trees, and methods to report diagnostics (via Report/Reportf) and manage facts (export/import).
- Facts are serializable intermediate results that allow cross-package analysis, similar to compiler export data, and must be encoded using gob for deterministic caching.
- The framework supports validation (Validate function), testing utilities (analysistest), and driver programs like singlechecker and multichecker to run analyzers as standalone commands.