What a linter actually is
A linter is a static analyzer for code: it reads the source, builds a model of it (usually an AST), runs a set of rules against the model, and reports rule violations. Static means it never executes the code — which is why a linter can't catch every bug, and also why it can run on every commit in seconds.
The original lint was a 1978 C tool from Bell Labs that found classes of bug the early compilers missed: uninitialized variables, dead code, type confusion. Modern linters extend the lineage in three directions:
- Wider rule sets. Style consistency, naming, library-specific anti-patterns, security smells.
- Faster runtimes. Incremental, parallel, often written in Rust or Go to clear millions of lines in seconds.
- Tighter editor integration. Most ship an LSP server so diagnostics appear inline as you type.
The trade-off in one sentence: a linter is anything that catches mistakes without running the code. The further you push toward catching real bugs, the slower and noisier it gets. The further toward style, the cheaper and quieter — but the less load-bearing for correctness.
