Skip to contentSkip to conversation

scripts: coccicheck: Refactor display messages on coccinelle start up

PATCH New Sumera Priyadarsini 1 participant 1 message Oct 3, 2020 Coccinelle/Semantic Patches (SmPL)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: coccicheck: Refactor display messages on coccinelle start up

Currently, coccinelle starts by printing
"When using "patch" mode, carefully review the
patch before submitting it."

Modify coccicheck to print this message only when the user has explicitly selected "patch" or "chain" mode.

---
 scripts/coccicheck | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/coccicheck +3 -1
index e04d328210ac..07d1b5831bf6 100755
@@ -118,7 +118,9 @@ fi
 if [ "$ONLINE" = "0" ] ; then
     echo ''
     echo 'Please check for false positives in the output before submitting a patch.'
-    echo 'When using "patch" mode, carefully review the patch before submitting it.'
+    if [ "$MODE" = "patch" -o "$MODE" = "chain" ] ; then
+        echo 'When using "patch" mode, carefully review the patch before submitting it.'
+    fi
     echo ''
 fi
 
Signature · 6 lines
2.25.1

_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci