aboutsummaryrefslogtreecommitdiff
path: root/scripts/coccinelle/try_parse.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccinelle/try_parse.sh')
-rwxr-xr-xscripts/coccinelle/try_parse.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/coccinelle/try_parse.sh b/scripts/coccinelle/try_parse.sh
index 865c85570a..3033242946 100755
--- a/scripts/coccinelle/try_parse.sh
+++ b/scripts/coccinelle/try_parse.sh
@@ -5,6 +5,8 @@
top="$(dirname "$0")/../.."
+exitcode=0
+
for fn in "$@"; do
if spatch -macro_file_builtins "$top"/scripts/coccinelle/tor-coccinelle.h \
@@ -13,6 +15,13 @@ for fn in "$@"; do
: # it's perfect
else
echo "$fn"
+ if test "${VERBOSE}" != ""; then
+ spatch -macro_file_builtins "$top"/scripts/coccinelle/tor-coccinelle.h \
+ -I "$top" -I "$top"/src -I "$top"/ext --parse-c "$fn"
+ fi
+ exitcode=1
fi
done
+
+exit "$exitcode"