2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Merge branch 'pspacek/clang-format-gen-patch' into 'main'

retain diff output if clang-format changes something

See merge request isc-projects/bind9!5543
This commit is contained in:
Petr Špaček 2021-10-29 07:07:09 +00:00
commit b2eb166758

View File

@ -446,7 +446,13 @@ clang-format:
needs: [] needs: []
script: script:
- if [ -r .clang-format ]; then "${CLANG_FORMAT}" -i -style=file $(git ls-files '*.c' '*.h'); fi - if [ -r .clang-format ]; then "${CLANG_FORMAT}" -i -style=file $(git ls-files '*.c' '*.h'); fi
- git diff > clang-format.patch
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
artifacts:
paths:
- clang-format.patch
expire_in: "1 week"
when: on_failure
coccinelle: coccinelle:
<<: *precheck_job <<: *precheck_job