diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/format-code.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/format-code.sh b/tools/format-code.sh new file mode 100755 index 0000000..68be1d8 --- /dev/null +++ b/tools/format-code.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# get names of staged files | filter out the header and cpp files | clang-format them +git diff --staged --name-only | grep --regex="\.h\|\.cpp" | xargs clang-format -i |