cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Sumera Priyadarsini <sylphrenadin@gmail.com>
To: Julia.Lawall@lip6.fr
Cc: linux-kernel@vger.kernel.org, michal.lkml@markovi.net,
	nicolas.palix@imag.fr, cocci@systeme.lip6.fr,
	Gilles.Muller@lip6.fr
Subject: [Cocci] [PATCH] scripts: coccicheck: Refactor display messages on coccinelle start up
Date: Sat, 3 Oct 2020 19:50:12 +0530	[thread overview]
Message-ID: <20201003142012.idwudlhqiv3a4mjj@adolin> (raw)

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.

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
---
 scripts/coccicheck | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index e04d328210ac..07d1b5831bf6 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -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
 
-- 
2.25.1

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

                 reply	other threads:[~2020-10-03 14:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201003142012.idwudlhqiv3a4mjj@adolin \
    --to=sylphrenadin@gmail.com \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Julia.Lawall@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).