ast-grep
CLI tool for structural code search, lint and rewriting
ast-grep is a Rust-based command-line utility designed for structural code searching, static analysis, linting, and automated source code rewriting. It uses Tree-sitter to parse source files into abstract syntax trees instead of relying exclusively on textual pattern matching. Developers can construct search patterns using familiar programming syntax and metavariables representing code structures. Declarative YAML rules support complex matching conditions, customized diagnostics, and...