Instagram / Fixit

Advanced Python linting framework with auto-fixes and hierarchical configuration that makes it easy to write custom in-repo lint rules.
https://fixit.rtfd.io/en/latest/
Other
659 stars 62 forks source link

Problem configuring custom rules in pre-commit. #432

Open eugenenelou opened 4 months ago

eugenenelou commented 4 months ago

Hello, I have written some custom rules and have them working when running fixit directly,

but they are not run by the pre-commit. The setup is that the python code is in a backend/ directory, including the pyproject.toml configuring fixit, and the directory containing the custom rules.

I tried copying the [tool.fixit] in a pyproject.toml file at the root of the repository, but it's not working either.

using versions:

Edit: it seems actually that the problem is that the fixit fix --automatic command does not return a non-zero code if there are still changes, the fixit lint actually works for this. But I'd prefer to run fixit fix in pre-commit.