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

ci: add more pre-commit hooks, and clean up what the hooks flagged #91

Merged
merged 3 commits into from
Jan 19, 2022

Conversation

jenstroeger
Copy link
Owner

@jenstroeger jenstroeger commented Jan 6, 2022

I added a bunch of new pre-commit hooks, and they reformatted the YAML and TOML files and found a few minor issues. Note, though, that said reformatting removed comments…

Bummer that I still haven’t figured out why three hooks run on git push when only one is configured to do so:

> git push --set-upstream origin pre-commit-improvements
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
tox......................................................................Passed

@jenstroeger jenstroeger requested a review from behnazh January 6, 2022 13:18
@jenstroeger jenstroeger force-pushed the staging branch 2 times, most recently from 5ab088f to 61c2b39 Compare January 15, 2022 09:32
@jenstroeger jenstroeger force-pushed the pre-commit-improvements branch from 78527b0 to 5576e28 Compare January 15, 2022 09:57
@jenstroeger jenstroeger changed the title ci: add more pre-commit hooks, and clean up what the hooks have flagged ci: add more pre-commit hooks, and clean up what the hooks flagged Jan 15, 2022
@jenstroeger
Copy link
Owner Author

Bummer that I still haven’t figured out why three hooks run on git push when only one is configured to do so:

> git push --set-upstream origin pre-commit-improvements
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
tox......................................................................Passed

So, the default configuration for these hooks contains

    stages: [commit, push, manual]

which is why the above hooks run on commit and push. Fixed to run on commit only. I also added a name to most hooks to print a more readable output. Lastly, I removed language specific versions from the hooks to give them more flexibility wrt. to the hosting venv.

@jenstroeger jenstroeger force-pushed the pre-commit-improvements branch from 5576e28 to 01ab990 Compare January 15, 2022 10:05
@jenstroeger jenstroeger force-pushed the pre-commit-improvements branch from 01ab990 to ec160a4 Compare January 16, 2022 22:39
@jenstroeger jenstroeger requested a review from behnazh January 16, 2022 22:39
@jenstroeger jenstroeger merged commit 7c53de3 into staging Jan 19, 2022
@jenstroeger jenstroeger deleted the pre-commit-improvements branch February 7, 2022 04:46
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