2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 18:19:42 +00:00
bind/util/check-cocci

19 lines
389 B
Plaintext
Raw Normal View History

#!/bin/sh
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" --very-quiet --include-headers >> "$patch";
done
if [ "$(< "$patch" wc -l)" -gt "0" ]; then
cat "$patch"
ret=1
else
rm "$patch"
fi
done
exit $ret