]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Revert to patch generating check-cocci script
authorOndřej Surý <ondrej@sury.org>
Tue, 16 Jul 2019 14:50:09 +0000 (16:50 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 23 Jul 2019 19:32:35 +0000 (15:32 -0400)
The coccinelle and util/update_copyright script have different
idea about how the whitespace should look like.  Revert the script
to the previous version, so it doesn't mangle the files in place,
and deal with just whitespace changes.

.gitlab-ci.yml
util/check-cocci

index 5d76d407b4c32d47606d6ddf68b79647bf0fbf39..b7067c89628c2a189910372d4211bd85d67abb04 100644 (file)
@@ -228,7 +228,9 @@ misc:sid:amd64:
 
 🐞:sid:amd64:
   <<: *precheck_job
-  script: util/check-cocci
+  script:
+    - util/check-cocci
+    - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
 
 # Jobs for doc builds on Debian Sid (amd64)
 
index e6d501d7bf272efa09938e0ea298619155e0aec4..48bd1327733dc759175d075bfafeb71ebe60deb8 100755 (executable)
@@ -1,10 +1,18 @@
 #!/bin/sh
-set -e
 
+ret=0
 for spatch in cocci/*.spatch; do
+    patch="$(dirname "$spatch")/$(basename "$spatch" .spatch).patch"
+    : > "$patch"
     for dir in bin lib fuzz; do
-       spatch --sp-file="$spatch" --use-gitgrep --dir "$dir" --in-place --quiet
+       spatch --sp-file="$spatch" --use-gitgrep --dir "$dir" --very-quiet --include-headers >> "$patch";
     done
+    if [ "$(< "$patch" wc -l)" -gt "0" ]; then
+       cat "$patch"
+       ret=1
+    else
+       rm "$patch"
+    fi
 done
 
-exit 0
+exit $ret