diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..a3cf6a1f --- /dev/null +++ b/.clang-format @@ -0,0 +1,7 @@ +--- +BasedOnStyle: Google +IndentWidth: 2 +--- +Language: Cpp +ColumnWidth: 100 +--- diff --git a/scripts/apply-clang-format.sh b/scripts/apply-clang-format.sh new file mode 100755 index 00000000..36f5ee92 --- /dev/null +++ b/scripts/apply-clang-format.sh @@ -0,0 +1,8 @@ +#!/bin/bash +if [[ ! -f README.md ]]; then + cd .. +fi + +find ./src -iname *.h -o -iname *.cpp | xargs clang-format --style=file -i +find ./hal -iname *.h -o -iname *.cpp | xargs clang-format --style=file -i +find ./tests -iname *.h -o -iname *.cpp | xargs clang-format --style=file -i