Set up auto-formatter
This commit is contained in:
2
scripts/check-format.sh
Executable file
2
scripts/check-format.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
scripts_dir=`dirname $0`
|
||||
sh "$scripts_dir/sources.sh" | xargs -n 1 clang-format --dry-run --Werror
|
||||
2
scripts/format.sh
Executable file
2
scripts/format.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
scripts_dir=`dirname $0`
|
||||
sh "$scripts_dir/sources.sh" | xargs -n 1 clang-format -i
|
||||
3
scripts/sources.sh
Executable file
3
scripts/sources.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
root=`git rev-parse --show-toplevel`
|
||||
find "$root/engine" "$root/tests" -name '*.c' -o -name '*.h'
|
||||
Reference in New Issue
Block a user