Add pre-commit hooks configuration
Summary
Fixes #193
Since I'm not very familiar with how this tool works, I am unsure whether it is safe to run multiple Fixit processes (which is what pre-commit does by default by splitting out passed file names evenly) in parallel or if Fixit should be passed with all files at once. If it can cause some issues, I can add require_serial option.
It would be great also to include this in the documentation though I don't know where you would want me to put it, it doesn't seem like there's any document related to integrations with IDEs and other tooling yet.
Test Plan
- Install pre-commit using:
python -m pip install pre-commit
- Create a repository with a lint rule and autofixer to test on (I'm not familiar with this tool so I can't really give a specific example, I assume a reviewer will be able to come up with one)
- Run pre-commit on all files to test the behavior of the hook:
pre-commit run --all-files
I think this would be a great place to add the docs (as a separate section)
Alright, I'll try doing that today then.
About the failing checks, they are not related to this PR, seems like running CI on main now fails:
https://github.com/jack1142/Fixit/actions/runs/2324313329
Took me 2 months to get to this but the documentation is now committed :)
Hey there! We appreciate your contributions, but we're in the process of making some large changes to the core of Fixit. We will try to have more info about the direction we're heading soon, but in the mean time, we are closing all outstanding PR's from before we started this work. Thank you for your understanding.
@Jackenmen Could you submit this PR again?
I could but it's not clear to me that the new PR wouldn't just get closed again due to the changes @amyreese was talking about (whatever they are exactly). Until someone from the maintainers confirms that PR can be made, I don't think it makes sense to submit it as it could be considered as spam.
@Jackenmen I'd be happy to review a PR adding precommit support (and appropriate docs) for the new, in-progress version so that it's available when we make a alpha/beta release in the near future. The CLI has changed, and the documentation has been completely redone, so it might be easier to make a new PR for that.
Docs for the upcoming version can be viewed at https://fixit.readthedocs.io/en/latest/
All that said, if you still believe this is useful for existing releases, we can reopen this PR and update it to apply to the 0.x branch. Just be aware that we have no plans to make a new release from that branch.