Skip to content

Unfixable rule silently ignored with --update-all #2681

Description

@adamsol

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions