diff options
author | Ray Strode <rstrode@redhat.com> | 2024-04-25 13:37:54 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2024-04-25 13:37:54 -0400 |
commit | 001fb132164987174f852a47a24d665d97b046f3 (patch) | |
tree | 62391f044b2137a98d7a5f0d3afd31a53d8a2483 | |
parent | 09a494c60b71d725e0b554a4b81c4b277dcecd38 (diff) |
ci: Resync check-format.sh from plymouthmain
plymouth has had a few changes to check-format.sh since accountsservice
forked it. I don't exactly
recall what those changes were or what they were for, but check-format
has been acting weird lately, and I don't really have time to
investigate, so maybe they'll help.
-rwxr-xr-x | tests/check-format.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/check-format.sh b/tests/check-format.sh index de676c3..dc86173 100755 --- a/tests/check-format.sh +++ b/tests/check-format.sh @@ -26,15 +26,19 @@ if [ "$DIRTY_TREE" -ne 0 ]; then fi find -name '*.[ch]' -exec uncrustify -q -c tests/latest-uncrustify.cfg --replace {} \; -git diff > after + +echo > after +find -name '*.[ch]' -exec git diff -- {} \; >> after git reset --hard $UPSTREAM_BRANCH + find -name '*.[ch]' -exec uncrustify -q -c tests/latest-uncrustify.cfg --replace {} \; -git diff > before +echo > before +find -name '*.[ch]' -exec git diff -- {} \; >> before -interdiff --no-revert-omitted before after > diff +interdiff -B --no-revert-omitted before after > diff -if [ -n "$(cat diff)" ]; then +if [ -n "$(cat diff | grep -vE '^only in patch[12]:')" ]; then echo "Uncrustify found style abnormalities" 2>&1 cat diff exit 1 |