diff options
| author | Jean-François Milants <jf@codingfield.com> | 2022-09-11 14:59:49 +0200 |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2022-09-11 14:59:49 +0200 |
| commit | ada2c09581d2d13acfa5ce9a97671c0ec17863f1 (patch) | |
| tree | 2f776adc59d0c63e403d2043cb8460e65d6c46fe /tests/test-format.sh | |
| parent | 18cff286c75f432095db4b188e0f9a8a9e2bd8e8 (diff) | |
| parent | c9a5c3fa5c930a5939d3114a6c6b48570d61ca24 (diff) | |
Merge branch 'develop' into infineat-external-resources
# Conflicts:
# src/displayapp/screens/Symbols.h
# src/displayapp/screens/settings/SettingWatchFace.cpp
# src/displayapp/screens/settings/SettingWatchFace.h
Diffstat (limited to 'tests/test-format.sh')
| -rwxr-xr-x | tests/test-format.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/test-format.sh b/tests/test-format.sh index 86667c75..fd3201d0 100755 --- a/tests/test-format.sh +++ b/tests/test-format.sh @@ -16,18 +16,17 @@ for file in $CHANGED_FILES do [ -e "$file" ] || continue case "$file" in - src/libs/*) continue ;; + src/libs/*|src/FreeRTOS/*) continue ;; *.cpp|*.h) echo Checking "$file" - clang-format -i "$file" - if ! git diff --quiet + PATCH="$(basename "$file").patch" + git clang-format-12 -q --style file --diff "$GITHUB_BASE_REF" "$file" > "$PATCH" + if [ -s "$PATCH" ] then printf "\033[31mError:\033[0m Formatting error in %s\n" "$file" CHANGED=1 - git add "$file" - git commit -q -m "Apply clang-format to $(basename "$file")" - printf "Creating patch " - git format-patch HEAD~ + else + rm "$PATCH" fi esac done |
