mirror of
https://github.com/fastogt/fastocloud.git
synced 2025-02-12 16:51:56 +00:00
15 lines
285 B
Bash
15 lines
285 B
Bash
#!/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
|