improve shell scripts and update .gitignore
This commit is contained in:
parent
33b1f37e37
commit
eee6f2de31
8 changed files with 93 additions and 73 deletions
|
|
@ -1,14 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Runs the Clang Formatter
|
||||
# Return codes:
|
||||
# - 1 there are files to be formatted
|
||||
# - 0 everything looks fine
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
set -eu
|
||||
|
||||
FILES=`find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \)`
|
||||
FILES=$(find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \))
|
||||
|
||||
clang-format -i $FILES && git diff --exit-code
|
||||
for f in $FILES
|
||||
do
|
||||
clang-format -i "$f" && git diff --exit-code
|
||||
done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue