Revert to patch generating check-cocci script

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.
This commit is contained in:
Ondřej Surý 2019-07-16 16:50:09 +02:00
parent 3bcd05f081
commit 7f828a213c
2 changed files with 14 additions and 4 deletions

View 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)

View file

@ -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