Hey, ast-grep is a nice tool, and I'm trying to use it as an extra linter and autofixer for Python. I have two rules, one with fix and one without (which is a common situation with standard linters like ruff). For the first rule's autofix to work, I added --update-all to the ast-grep scan command. However, this caused the second rule to be silently ignored - it doesn't display or do anything.
According to the docs, --update-all should only "Apply all rewrite without confirmation", so disabling other rules this way is unexpected and looks like a bug (but I chose the blank issue template because the bug template required a link to the playground, and the playground doesn't seem to support setting CLI options to reproduce this behaviour).
A possible workaround is to run the command second time, without --update-all, but it's of course not very pretty or efficient.
Hey, ast-grep is a nice tool, and I'm trying to use it as an extra linter and autofixer for Python. I have two rules, one with
fixand one without (which is a common situation with standard linters like ruff). For the first rule's autofix to work, I added--update-allto theast-grep scancommand. However, this caused the second rule to be silently ignored - it doesn't display or do anything.According to the docs,
--update-allshould only "Apply all rewrite without confirmation", so disabling other rules this way is unexpected and looks like a bug (but I chose the blank issue template because the bug template required a link to the playground, and the playground doesn't seem to support setting CLI options to reproduce this behaviour).A possible workaround is to run the command second time, without
--update-all, but it's of course not very pretty or efficient.