What happened

golang.org/x/tools/go/analysis is the Go team's framework behind go vet, gopls and nearly every Go linter you have ever run: you write an Analyzer declaring a name, its dependencies and a Run function; a driver hands it a Pass with one package's syntax and type information; diagnostics with machine-applicable SuggestedFixes come out the other side. Write the checker once and it runs unchanged in the CLI, the IDE, Bazel and CI. This is decade-old documentation for long-shipped infrastructure, and it still front-paged at 212 points.

Why it matters

The Facts mechanism — small gob-serializable findings passed between packages the way the compiler passes export data between compilations — is the correct shape for any plugin system, and it has been hiding in plain sight in x/tools for years.

It is how the printf checker knows your custom logging wrapper eventually delegates to fmt.Printf without re-analyzing the whole dependency tree. The cost of using it has also collapsed: an HN commenter who builds SpiceDB reported a lot of success writing custom analyzers and said it is now "probably 10x easier with LLMs". Project-specific linters used to be a tribal-knowledge luxury for big shops; they are now a weekend commodity, and a bespoke analyzer is a code reviewer that works while you sleep.

But, but, but…

The docs are unusually candid about what the elegance costs. Facts must be gob-serializable pointers, stateless, deterministic and immutable; the dependency graph must be acyclic; and Bazel/Blaze drivers do not analyze the standard library at all, so checkers like printf hardcode knowledge — log.Printf wraps fmt.Printf — rather than inferring it.

Diagnostics deliberately carry no severity, because that is driver policy and not analyzer opinion. And true whole-program analysis — cross-package data flow, alias analysis, some concurrency race detection — is structurally forbidden by design rather than by omission. Strict modularity buys parallelism, caching and reuse; if you need the global view, you need a different tool.