You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dryRun previews an invalid rewrite as success, while apply refuses it. Pattern foo($A, $B), rewrite bar($B, $A (unbalanced), lang: typescript, dryRun: true → "Would replace 2 match(es)" with a diff containing bar(2, 1;. Without dryRun an invalid rewrite fails with "rewritten code failed syntax validation; no files were written". The preview should run the same validation, so a preview never promises a change apply will reject.
Variadic captures flatten multi-line matches. Source foo(\n 3,\n 4\n);, pattern foo($$$A), rewrite bar($$$A) → bar(3,\n4); (indentation lost; dryRun and apply agree). Expected the captured nodes to keep their original separators/indentation. Relatedly ast_grep_search displays the capture as $A: 1,,,2.
Working as expected: $$$ matching, ignoring matches in strings/comments, globs and negated globs, dryRun leaving files untouched, apply matching the preview for valid rewrites.
Activity
Use the canonical path argument in the #827/#828 repro tests
mason: ignored failing-first repros for aft_import comment/sort and a…
mason: keep comments with their imports, isort order for Python, refu…
mason: Pi ast_grep_search view shows a $$$ capture's source text (cor…