1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

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...
This commit is contained in:
Lennart Poettering 2017-11-29 19:49:05 +01:00
parent a2d61f0746
commit 2d0bc68450

11
coccinelle/run-coccinelle.sh Executable file
View File

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