⚡A CLI tool for code structural search, lint and rewriting. Written in Rust
This report summarizes scanner evidence for ast-grep/ast-grep, a Rust project with 16,401 GitHub stars. SynthScan examined 91,204 lines of code across 304 source files, recording 63 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 0.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 51 finding(s).
Are imports declared and package/API names verified? 8 finding(s).
Are wrappers, guards, and repeated structures necessary? 8 finding(s).
Which changes need focused human review? 63 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 63 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/core/src/pinned.rs | 1 | use crate::Doc; | COMMENT |
| LOW | crates/core/src/source.rs | 1 | //! This module defines the `Doc` and `Content` traits to abstract away source code encoding issues. | COMMENT |
| LOW | crates/core/src/tree_sitter/traversal.rs | 1 | //! # Traverse Node AST | COMMENT |
| LOW | crates/core/src/tree_sitter/mod.rs | 21 | pub enum TSParseError { | COMMENT |
| LOW | crates/config/src/rule_config.rs | 81 | COMMENT | |
| LOW | crates/config/src/rule_config.rs | 101 | pub message: String, | COMMENT |
| LOW | crates/config/src/rule/selector.rs | 1 | #![allow(clippy::doc_lazy_continuation)] | COMMENT |
| LOW | crates/config/src/rule/referent_rule.rs | 41 | #[derive(Clone, Default)] | COMMENT |
| LOW | crates/config/src/rule/parameterized_util.rs | 1 | //! Parameterized utility rules have two parts: | COMMENT |
| LOW | crates/config/src/rule/mod.rs | 41 | /// | COMMENT |
| LOW | crates/config/src/rule/mod.rs | 61 | /// It specifies the position in nodes' sibling list. | COMMENT |
| LOW | crates/config/src/rule/mod.rs | 81 | pub precedes: Maybe<Box<Relation>>, | COMMENT |
| LOW | crates/wasm/tests/web.rs | 1 | //! Integration tests for ast-grep-wasm. | COMMENT |
| LOW | crates/language/src/lib.rs | 1 | //! This module defines the supported programming languages for ast-grep. | COMMENT |
| LOW | crates/language/src/lib.rs | 201 | COMMENT | |
| LOW | crates/language/src/lib.rs | 221 | // https://developer.hashicorp.com/terraform/language/syntax/configuration#identifiers | COMMENT |
| LOW | crates/cli/src/config.rs | 41 | /// test configurations | COMMENT |
| LOW | crates/cli/src/run.rs | 61 | #[derive(Args)] | COMMENT |
| LOW | crates/cli/src/verify.rs | 161 | // for result in summary { | COMMENT |
| LOW | crates/cli/src/verify.rs | 181 | /// Conflicts with --update-all. | COMMENT |
| LOW | crates/cli/src/new.rs | 21 | name: Option<String>, | COMMENT |
| LOW | crates/cli/src/new.rs | 101 | } | COMMENT |
| LOW | crates/cli/src/new.rs | 121 | /// | COMMENT |
| LOW | crates/cli/src/scan.rs | 41 | /// --inline-rules is incompatible with --rule. | COMMENT |
| LOW | crates/cli/src/scan.rs | 61 | #[clap(flatten)] | COMMENT |
| LOW | crates/cli/src/completions.rs | 1 | //! How to use generate shell completions. | COMMENT |
| LOW | crates/cli/src/outline.rs | 41 | /// One source/signature line per top-level item. | COMMENT |
| LOW | crates/cli/src/outline.rs | 61 | /// You can pass optional value to this flag by using `--json=<STYLE>` syntax | COMMENT |
| LOW | crates/cli/src/outline.rs | 81 | /// if the TERM environment variable is not set or set to 'dumb'. | COMMENT |
| LOW | crates/cli/src/outline.rs | 101 | /// The regex is matched against item names, signatures, first source lines, | COMMENT |
| LOW | crates/cli/src/utils/worker.rs | 21 | /// `consume_items` will run in a separate single thread. | COMMENT |
| LOW | crates/cli/src/utils/args.rs | 21 | pub struct InputArgs { | COMMENT |
| LOW | crates/cli/src/utils/args.rs | 41 | /// Enable search code from StdIn. | COMMENT |
| LOW | crates/cli/src/utils/args.rs | 121 | } | COMMENT |
| LOW | crates/cli/src/utils/args.rs | 161 | )] | COMMENT |
| LOW | crates/cli/src/utils/args.rs | 241 | /// Search hidden files and directories. By default, hidden files and directories are skipped. | COMMENT |
| LOW | crates/cli/src/utils/args.rs | 301 | } | COMMENT |
| LOW | crates/cli/src/utils/args.rs | 321 | /// | COMMENT |
| LOW | crates/cli/src/utils/args.rs | 341 | /// Set rule severity to hint | COMMENT |
| LOW | crates/cli/src/utils/inspect.rs | 1 | //! See https://github.com/ast-grep/ast-grep/issues/905 | COMMENT |
| LOW | crates/cli/src/print/mod.rs | 141 | /// N.B. this can be different from node.text() because | COMMENT |
| LOW | crates/outline/src/extractor.rs | 121 | /// | COMMENT |
| LOW | crates/outline/src/combined_extractor.rs | 1 | //! Combined outline extraction. | COMMENT |
| LOW | crates/outline/src/model.rs | 1 | //! Serializable outline result model. | COMMENT |
| LOW | crates/outline/src/model.rs | 61 | /// | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | crates/pyo3/tests/test_simple.py | 0 | function test() { let a = 123 let b = 456 let c = 789 } | STRING |
| HIGH | crates/pyo3/tests/test_wrong_usage.py | 0 | function test() { let a = 123 let b = 456 let c = 789 } | STRING |
| HIGH | crates/pyo3/tests/test_traversal.py | 0 | function test() { let a = 123 let b = 456 let c = 789 } | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/pyo3/ast_grep_py/__init__.py | 1 | CODE | |
| LOW | crates/pyo3/ast_grep_py/__init__.py | 4 | CODE | |
| LOW | crates/pyo3/ast_grep_py/__init__.py | 4 | CODE | |
| LOW | crates/pyo3/ast_grep_py/__init__.py | 4 | CODE | |
| LOW | crates/pyo3/ast_grep_py/__init__.py | 4 | CODE | |
| LOW | crates/pyo3/ast_grep_py/__init__.py | 4 | CODE | |
| LOW | crates/pyo3/ast_grep_py/__init__.py | 4 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | crates/napi/__test__/index.spec.ts | 51 | print("ザ・ワールド")` | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/napi/src/lib.rs | 75 | /// It utilize multiple CPU cores when **concurrent processing sources**. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/pyo3/tests/test_rule.py | 97 | def test_complex_config_dict_not_found(): | STRING |
| LOW | crates/pyo3/tests/test_wrong_usage.py | 14 | def test_wrong_use_pattern_as_dict(): | STRING |
| LOW | crates/pyo3/tests/test_wrong_usage.py | 41 | def test_error_for_invalid_kind(): | STRING |
| LOW | crates/pyo3/tests/test_wrong_usage.py | 45 | def test_no_error_for_invalid_pattern(): | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/config/src/rule/mod.rs | 388 | // TODO: implement positive/non positive | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/pyo3/ast_grep_py/__init__.py | 73 | __all__ = [ | CODE |