mirror of
https://github.com/fastogt/fastocloud.git
synced 2025-03-09 23:18:50 +00:00
Release 1.4.4
This commit is contained in:
commit
310132c21d
363 changed files with 32789 additions and 0 deletions
11
scripts/create_pre_commit_hook.sh
Normal file
11
scripts/create_pre_commit_hook.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
HOOKS="pre-commit"
|
||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||
|
||||
for hook in $HOOKS; do
|
||||
if [ ! -f $ROOT_DIR/.git/hooks/$hook ]; then
|
||||
ln -s $ROOT_DIR/scripts/$hook $ROOT_DIR/.git/hooks/$hook
|
||||
fi
|
||||
done
|
||||
|
15
scripts/pre-commit
Normal file
15
scripts/pre-commit
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
TOTAL_ERRORS=0
|
||||
|
||||
for file in `git diff-index --name-only --diff-filter=d HEAD`; do
|
||||
case "${file#*.}" in
|
||||
cpp|c|h)
|
||||
clang-format -i "${file}"
|
||||
cpplint "${file}"
|
||||
TOTAL_ERRORS=$(expr $TOTAL_ERRORS + $?);
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit $TOTAL_ERRORS
|
Loading…
Add table
Add a link
Reference in a new issue