ast-grep.
Match forbidden syntax structurally
Express a repository convention as a syntax-tree pattern. Keep a matching fixture and a near miss alongside the rule so equivalent formatting produces the same finding.
JavaScript / TypeScript / Rust / Go / Python
Community rubric · v1
The evidence
One point for each verified check. Unknown means we still need evidence. Contrary evidence records an observed result that goes against the criterion.
Latest evidence review ·
Definition
VerifiedA rule selects syntax-tree nodes satisfying its specified fields. Node kinds and structural relationships constrain the match beyond surface text.
Measurement
VerifiedThe test runner evaluates two lists: valid snippets must produce no match, and invalid snippets must trigger the rule.
Conformance
VerifiedThe published no-await-in-loop example supplies valid and invalid snippets and expected rule behavior. It exercises that structural rule, not arbitrary user rules.
CI enforcement
VerifiedA match on a rule set to error makes ast-grep scan return nonzero. Warning and hint levels allow a team to distinguish advisory checks from build gates.
Getting started
VerifiedThe quick start provides installation choices and a runnable search that finds a JavaScript pattern before demonstrating how to rewrite it.
Real-world adoption
UnknownNo reviewed evidence is recorded for this dimension.
Has another team put it to work? Contribute evidence ↗
Agent guidance
UnknownNo reviewed evidence is recorded for this dimension.
Can an agent act on a specific finding? Contribute evidence ↗
Agent portability
UnknownNo reviewed evidence is recorded for this dimension.
Does the practice work in two agent harnesses? Contribute evidence ↗
Use this standard
Run the check with the tool installed and configured for your project.
ast-grep scan
Agent prompt
Use ast-grep in this repository to meet this standard: Match forbidden syntax structurally. Express a repository convention as a syntax-tree pattern. Keep a matching fixture and a near miss alongside the rule so equivalent formatting produces the same finding. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.