diff --git a/.clang-format b/.clang-format index c710347e7..e0b380671 100644 --- a/.clang-format +++ b/.clang-format @@ -1,14 +1,13 @@ --- BasedOnStyle: Chromium -IndentWidth: '4' -SortIncludes: 'false' -AllowAllArgumentsOnNextLine: 'true' +IndentWidth: 4 +SortIncludes: false +AllowAllArgumentsOnNextLine: true ColumnLimit: 0 -Cpp11BracedListStyle: 'true' -AllowShortLoopsOnASingleLine: 'true' -AllowShortIfStatementsOnASingleLine: 'true' +Cpp11BracedListStyle: true +AllowShortLoopsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: true SpacesInLineCommentPrefix: Minimum: 1 Maximum: 1 - ... diff --git a/format-code.sh b/format-code.sh index b0e9bb507..d1190c5d5 100755 --- a/format-code.sh +++ b/format-code.sh @@ -1,2 +1,11 @@ #!/bin/sh -find firmware/common firmware/baseband firmware/application firmware/test/application firmware/test/baseband -iname '*.h' -o -iname '*.hpp' -o -iname '*.cpp' -o -iname '*.c' | xargs clang-format-18 -style=file -i + +find firmware/common \ + firmware/baseband \ + firmware/application \ + firmware/test/application \ + firmware/test/baseband \ + \( -iname '*.h' -o -iname '*.hpp' -o -iname '*.c' -o -iname '*.cpp' \) \ + -print0 | \ + xargs -0 clang-format-18 -style=file -i +