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
feat: add pre-commit
hook for running the format.sh
script
#3637
feat: add pre-commit
hook for running the format.sh
script
#3637
Conversation
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
this looks good to me, what do you say @nilsnolde ? |
@@ -12,15 +12,13 @@ readonly CLANG_FORMAT_VERSION=7.0.0 | |||
|
|||
source scripts/bash_utils.sh | |||
setup_mason | |||
setup_pre_commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cheeky but that's a really good idea:)
jep thanks a ton @vinayakkulkarni . this should save some serious resources on circleci I hope:) |
ah, and don't forget a changelog entry (bottom of the list for new entries) |
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
This gives me an idea of an automation script for doing this instead of manually updating it each time a PR is created |
I thought about that recently, where my main motivation was the super annoying merge conflicts resulting from changelog entries and circleci not skipping markdown changes (no good solution came out of thinking/googling). I understand it's a little annoying and even I forget it sometimes, but any automation would need every contributor to be really decent about either their commit messages or their PR titles I assume right? and how would that deal with merge conflicts resulting from different PRs? |
I would just like to raise one concern. If you merge the docker lint precommit stuff but don't fix the dockerfiles the next person who runs this will be forced to deal with it. I think that's not a very good way to do it. I'd either fix the dockerfiles in this pr or disable the docker linting before merging |
Hey @kevinkreiser, I decided to remove the hadolint in this PR and create a new PR for formatting the Dockerfiles, keeping this PR clean by just installing the the |
pre-commit
hook as per discussion in proper pre-commit script #3613 & build: addpre-commit
script #3622 (comment)Example:
PS. This also lints the Dockerfiles using Hadolint :)
PPS. Thanks for this amazing open-source software ❤️