Dart 66 🎯 Writing Custom Static Analysis Rules with AST (Abstract Syntax Tree) Visitors
A custom lint rule is not a pattern matcher over source text. It is a visitor over a syntax tree. When the Dart analyzer parses a file, it produces an Abstract Syntax Tree—a structured representation where every declaration, expression, and identifier is a node with a type and children. A lint rule walks that tree,…