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

Add pre-commit for bandit, codespell, and flake8 #630

Closed
wants to merge 1 commit into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Aug 21, 2021

As discussed at #629 (comment) add https://pre-commit.com for our fastest lint steps (bandit, codespell, flake8, and soon black and isort) to run locally in the git commit process and also in .github/workflows/ci.yml.

@amacneil
Copy link
Member

Open to input from other contributors, but I'm personally not convinced of the utility of this. I prefer to keep pre-commit hooks as something people can configure if they like that approach, and I'd advocate for keeping our CI all in one place (Github Actions) and limit it to running simple scripts (which can easily be run locally as well) rather than adding a dependency on another service (https://pre-commit.ci/) which will have its own downtime, potentially change or go away in the future, etc (not making any claims that its downtime is better or worse than Github Actions, just that we would now have two services that can fail).

My preferences here are because I prefer editor integration (e.g. #629) and automatic formatting of files on save rather than pre-commit hooks or some service appending commits to PRs (shift left philosophy).

@cclauss
Copy link
Contributor Author

cclauss commented Aug 23, 2021

This PR runs pre-commit on GitHub Actions.

I have removed the alternative CI task above to autocorrect errors.

@cclauss cclauss closed this Aug 24, 2021
@cclauss cclauss deleted the pre-commit-again branch August 24, 2021 20:06
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

Successfully merging this pull request may close these issues.

2 participants