Implement --extend-fixable
and --extend-unfixable
variants in CLI
#4289
Labels
configuration
Related to settings and configuration
Consider the following ruff config:
F401 and F841 are added as unfixable so that ruff doesn't automatically remove violating lines on file save (it's set up in the editor for autoformat). I do want to enable them in my pre-commit config though. So what I have done is configure the ruff hook like so:
However, this makes ruff consider only those two codes as fixable. So I thought I could fix it by passing --unfixable=E501, for example, assuming that would override the value set in the ruff config. The doesn't seem to be the case though, ruff still does not fix the errors.
This does not depend on pre-commit btw, the same can be reproduced by just running ruff from CLI. Essentially, I'm looking for a way to overwrite unfixable, without using --isolated, because there is more config than the minimal example above.
Is there a generally recommended way to do this?
The text was updated successfully, but these errors were encountered: