Fixit icon indicating copy to clipboard operation
Fixit copied to clipboard

Add pre-commit hooks configuration

Open Jackenmen opened this issue 3 years ago • 3 comments

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

  1. Install pre-commit using:
python -m pip install pre-commit
  1. 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)
  2. Run pre-commit on all files to test the behavior of the hook:
pre-commit run --all-files

Jackenmen avatar May 13 '22 12:05 Jackenmen

I think this would be a great place to add the docs (as a separate section)

zsol avatar May 13 '22 17:05 zsol

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

Jackenmen avatar May 14 '22 15:05 Jackenmen

Took me 2 months to get to this but the documentation is now committed :)

Jackenmen avatar Jul 10 '22 19:07 Jackenmen

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.

amyreese avatar Oct 07 '22 01:10 amyreese

@Jackenmen Could you submit this PR again?

eggplants avatar Nov 22 '22 05:11 eggplants

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 avatar Nov 22 '22 12:11 Jackenmen

@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.

amyreese avatar Nov 28 '22 23:11 amyreese