Debian Codegraph @

goodies/format

raw
1 #!/bin/sh
2
3 cd `dirname $0`/../
4
5 # format code
6 find ./ -type f \( -name "*.cpp" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" \) \
7 ! -path "./CMakeFiles/*" ! -path './external/*' ! -path "./vendor/*"\
8 ! -path './build/*' ! -path "*_deps/*" ! -path "./vcpkg/*" \
9 -exec clang-format
10 -style="{BasedOnStyle: llvm, IndentWidth: 4, AllowShortFunctionsOnASingleLine: None, SortIncludes: false, KeepEmptyLinesAtTheStartOfBlocks: false, ColumnLimit: 120}"
11 -i {} \;
12
13
14 # Format CMake
15 cmake-format -i CMakeLists.txt cmake/*