mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2025-04-20 03:06:26 +02:00
move tools to hooks
This commit is contained in:
parent
0cb6ffe6c1
commit
1406f38aa3
3
hooks/git-pre-commit-hook
Executable file
3
hooks/git-pre-commit-hook
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cargo fmt --all
|
12
hooks/git-pre-push-hook
Executable file
12
hooks/git-pre-push-hook
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo -e "Checking code formatting:\n=========================\n\n" 1>&2
|
||||||
|
|
||||||
|
cargo fmt --check
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]
|
||||||
|
then
|
||||||
|
o=$?
|
||||||
|
echo -e "\n\nRun \`cargo fmt --all\` before pushing please." 1>&2
|
||||||
|
exit $o
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user