-
Notifications
You must be signed in to change notification settings - Fork 14
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
Pre-commit git hook helper script #818
base: master
Are you sure you want to change the base?
Conversation
scripts/pre-commit
Outdated
# ln -s -f ../../tools/pre-commit .git/hooks/pre-commit | ||
# ---------------------------------------------------------------- | ||
|
||
CLANG_FORMAT_VERSION=clang-format-12 |
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.
DLAF requires version 10. It might make sense to reuse the scripts that are being used in https://github.com/eth-cscs/DLA-Future/blob/master/.github/workflows/check_format.yml, no?
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.
ooh. I didn't see that stuff in .github
I like the test script - except that it doesn't show the user which files to reformat etc. I will investigate further.
I have modified the primary .github/format.sh script to allow git precommit use. |
When run as a pre-commit hook, the script will output the names of any badly formatted cpp or cmake files and supply a command line than can be used to fix them
No description provided.