Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use pre-commit (the framework) for linting and code formatting and in CI #861

Open
jkittner opened this issue Mar 6, 2023 · 0 comments
Open

Comments

@jkittner
Copy link
Contributor

jkittner commented Mar 6, 2023

Is your feature request related to a problem? Please describe.

When trying to run the shell/lint.sh and shell/format.sh commands, I ran into a bunch of issues, with tools missing, isort trying to format my entire virtual environment etc. etc.

Describe the solution you'd like

I can see, that you are already setting one of the scripts up as a pre-commit hook:

echo "sh shell/lint.sh" > .git/hooks/pre-commit

I would suggest using pre-commit.com (the framework), which manages all installations and makes the tools reproducible for every contributor. For CI, one could use pre-commit.ci which runs the checks very quickly (in seconds) and also applies autofixes, to a PR, if the user did non run pre-commit (which is opt in, the user has to run pre-commit install first to set it up as a pre-commit hook). You can also get frequent autoupdates as a PR, keeping the tools in the config up to date.

If you're interested in using this, I'd be happy to set this up and contribute with another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant