diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-11-29 19:49:05 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-29 20:12:26 +0100 |
commit | 2d0bc6845005e222b8b48c31fdeb8b56a6590f18 (patch) | |
tree | 83ba78d7b1417a30cf90adc1de4970e1971d9a88 /coccinelle/run-coccinelle.sh | |
parent | coccinelle: fix IN_SET/!IN_SET scripts, and apply some changes it found (diff) | |
download | systemd-2d0bc6845005e222b8b48c31fdeb8b56a6590f18.tar.xz systemd-2d0bc6845005e222b8b48c31fdeb8b56a6590f18.zip |
coccinelle: add a run-coccinelle.sh script that runs all scripts
One day we should start running something like this as part of CI so
that non-well-formed commits are not even accepted...
Diffstat (limited to 'coccinelle/run-coccinelle.sh')
-rwxr-xr-x | coccinelle/run-coccinelle.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/coccinelle/run-coccinelle.sh b/coccinelle/run-coccinelle.sh new file mode 100755 index 0000000000..fe3aeb68ce --- /dev/null +++ b/coccinelle/run-coccinelle.sh @@ -0,0 +1,11 @@ +#!/bin/bash -e + +for SCRIPT in *.cocci ; do + [ "$SCRIPT" = "empty-if.cocci" ] && continue + echo "--x-- Processing $SCRIPT --x--" + TMPFILE=`mktemp` + spatch --sp-file $SCRIPT --dir $(pwd)/.. 2> "$TMPFILE" || cat "$TMPFILE" + rm "$TMPFILE" + echo "--x-- Processed $SCRIPT --x--" + echo "" +done |