ast-grep
ast-grep is a command line tool that uses the abstract syntax tree (AST) structure instead of text-based search on the codebase. With Tree-sitter infrastructure, it performs structural search, static analysis, and batch code editing on code. Users can manage matching and rewriting processes by identifying code pieces through patterns.
ast-grep
100ast-grep · Code Quality & Review
Common commercial products in this category: SonarCloud, Codacy, DeepSource
- You can search for specific syntax structures in your codebase using patterns.
- You can automatically rewrite the blocks of code you detect.
- You can perform light-scale static analysis and code edits on your projects.
- ↑ PositiveHacker News
AST-grep(sg) is a CLI tool for code structural search, lint, and rewriting
“Hi, ast-grep author here. This is a great question and I asked this in the first place before I started the hobby project. TLDR; I designed ast-grep to be on different tracks than semgrep. Semgrep is for security and ast-grep is for development. First and foremost, I have always…”
- ↓ NegativeHacker News
AST-grep(sg) is a CLI tool for code structural search, lint, and rewriting
“Why I think semgrep is a security tool different from ast-grep: * Semgrep is security focused. It has many advanced static analysis features in its core product, such as dataflow analysis, symbolic propagation, and semantic equivalence, all of which are useful for security…”
My note
Alternative pages
More in: Code Quality & Review
- Ruff★ 50,350 · today
- Oxlint★ 23,280 · today
- SwiftLint★ 19,780 · 14 days ago
- PHP-Parser★ 17,465 · 3 days ago
- infer★ 15,733 · 4 days ago
- pre-commit★ 15,673 · 10 days ago