[PATCH] Configuring COCCI parameter as a directory is supportted
From: zhongshiqi
Date: Wed Oct 23 2019 - 04:31:49 EST
This patch puts a modification in scripts/coccicheck which supports users
in configuring COCCI parameter as a directory to traverse files in
directory.
Signed-off-by: zhongshiqi <zhong.shiqi@xxxxxxxxxx>
---
scripts/coccicheck | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/coccicheck b/scripts/coccicheck
index e04d328..a1c4197 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -257,6 +257,10 @@ if [ "$COCCI" = "" ] ; then
for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' -type f | sort`; do
coccinelle $f
done
+elif [ -d "$COCCI" ] ; then
+ for f in `find $COCCI/ -name '*.cocci' -type f | sort`; do
+ coccinelle $f
+ done
else
coccinelle $COCCI
fi
--
2.9.5