diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..ada61da2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,8 @@ +--- +BasedOnStyle: Google +IndentWidth: 2 +--- +Language: Cpp +ColumnLimit: 100 +ReflowComments: true +--- diff --git a/apply-clang-format.sh b/apply-clang-format.sh new file mode 100755 index 00000000..6d77c6e9 --- /dev/null +++ b/apply-clang-format.sh @@ -0,0 +1,11 @@ +#!/bin/bash +if [[ ! -f README.md ]]; then + cd .. +fi + +find ./mission -iname *.h o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i +find ./linux -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i +find ./bsp_q7s -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i +find ./bsp_linux_board -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i +find ./bsp_hosted -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i +find ./test -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i