cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: zhongshiqi <zhong.shiqi@zte.com.cn>
To: Julia.Lawall@lip6.fr
Cc: wang.yi59@zte.com.cn, michal.lkml@markovi.net,
	nicolas.palix@imag.fr, linux-kernel@vger.kernel.org,
	xue.zhihong@zte.com.cn, cheng.shengyu@zte.com.cn,
	zhongshiqi <zhong.shiqi@zte.com.cn>,
	cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH v5] coccicheck: Support search for SmPL scripts within selected directory hierarchy
Date: Wed, 30 Oct 2019 10:54:30 +0800	[thread overview]
Message-ID: <1572404070-41580-1-git-send-email-zhong.shiqi@zte.com.cn> (raw)

*Allow defining the environment variable “COCCI” as a directory to search
SmPL scripts.

*Start a corresponding file determination if it contains an acceptable
path.

Signed-off-by: zhongshiqi <zhong.shiqi@zte.com.cn>
---
Changes in v5:
	1:rewrite change description as an enumeration

Changes in v4:
	1:rewrite change description in another wording

Changes in v3:
	1:rewrite change description
	2:fix patch subject
	3:modify commit log

Changes in v2:
	1.fix patch subject according to the reply by Markus
	<Markus.Elfring@web.de>
	2.change description in “imperative mood”
 
 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

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

             reply	other threads:[~2019-10-30  2:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30  2:54 zhongshiqi [this message]
2019-10-30 14:00 ` [Cocci] [PATCH v5] coccicheck: Support search for SmPL scripts within selected directory hierarchy Markus Elfring
2019-11-01  2:25   ` [Cocci] [PATCH v5] coccicheck: Support search for SmPL scripts withinselected " zhong.shiqi

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=1572404070-41580-1-git-send-email-zhong.shiqi@zte.com.cn \
    --to=zhong.shiqi@zte.com.cn \
    --cc=Julia.Lawall@lip6.fr \
    --cc=cheng.shengyu@zte.com.cn \
    --cc=cocci@systeme.lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    --cc=wang.yi59@zte.com.cn \
    --cc=xue.zhihong@zte.com.cn \
    /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).