perf(lint): one ast-grep scan feeds both the lint gate and the flaky-test ratchet (#33903)

lint:ast-grep and check-flaky-test-pattern-ratchet each parsed the whole tree.
ast-grep-gates.mjs scans once; the lint gate re-runs ast-grep only on files with
warning-or-error findings (ast-grep's own report and exit code), and the flaky
ratchet counts test-* matches from the shared scan.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-10-26 03:50:42 -07:00
committed by GitHub
co-authored by OrcaWin
parent 5ee6e42a3b
commit 819d273e27
6 changed files with 85 additions and 10 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ jobs:
if: needs.code_paths.outputs.static_analysis == 'true'
run: |
node_modules/.bin/ast-grep test --config config/sgconfig.yml --skip-snapshot-tests
node_modules/.bin/ast-grep scan --config config/sgconfig.yml --min-severity warning --format github src config tests mobile
node config/scripts/ast-grep-gates.mjs --format=github
# Why the full tree: it takes ~2s, and the pre-commit hook is skippable.
- name: Check formatting