Skip to content

--fix-only returns exit code 1 upon fixes #4092

@spapanik

Description

@spapanik

Thank you for the great work! Ruff is fantastic, and I have replaced all my linters with it. I just have a small feature request on the fixers of it.

Now, the cli options to fix the ruff issues are: ruff --fix . and ruff --fix-only . They are a bit problematic to work with in scripts, as even if they fix all the issues that are fixable, the exit code can be zero, if there are no fixable issues. There is the obvious workaround of adding || true, but this will mask all errors, for example ruff itself panicking instead of fixing the fixable issues. A new option that would allow just run it in fix mode.

Metadata

Metadata

Assignees

Labels

cliRelated to the command-line interface

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions