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 checks to pre-commit #467

Merged
merged 2 commits into from
Mar 19, 2022
Merged

Add checks to pre-commit #467

merged 2 commits into from
Mar 19, 2022

Conversation

ggravlingen
Copy link
Member

@ggravlingen ggravlingen commented Mar 19, 2022

I accidentally committed and pushed the version bump to master (have reverted that). Don't want to do the same mistake again so I'm adding a rule to pre-commit.

On a side note, I use Azure's git repos for work and we can set a rule preventing commits without PRs. Can that be on Github too? I'm not an admin of this repo so I can't check.

@MartinHjelmare
Copy link
Contributor

We can set rules for branches, yes.

rev: v4.1.0
hooks:
- id: requirements-txt-fixer
- id: check-json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do these two hooks do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requirements-txt-fixer - sorts entries in requirements.txt.

check-json - checks json files for parseable syntax.

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ggravlingen ggravlingen merged commit 9fda7b2 into master Mar 19, 2022
@ggravlingen ggravlingen deleted the add-checks-to-pre-commit branch March 19, 2022 09:31
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