On 2021-03-30 05:42:25 -0400 (-0400), Sorin Sbarnea wrote:
This is all is needed to make hacking being directly consumable by pre-commit (tool, not git hook): https://review.opendev.org/c/openstack/hacking/+/783820
I already did some tests and it worked fine, that is how I made bashate and doc8 long time ago:
https://github.com/openstack/bashate/blob/master/.pre-commit-hooks.yaml https://github.com/PyCQA/doc8/blob/master/.pre-commit-hooks.yaml
Once that is merged and released, you could replace the normal flake8 usage inside your repo .pre-commit-config.yaml file:
- repo: https://review.opendev.org/openstack/hacking rev: 4.1.0 # or whatever release number we will pick hooks: - id: hacking
If you want to add your own extra plugins you can still do it using the additional_dependencies key. [...]
I'm confused as to why you'd call it hacking when you're invoking flake8 with multiple plugins only one of which is hacking. It's just flake8 and the plugins you've installed for it, right? -- Jeremy Stanley