[Cocci] [PATCH v2] coccicheck:support $COCCI being defined as a directory

2019-10-23 Thread zhongshiqi
Put a modification in scripts/coccicheck which supports users in configuring COCCI parameter as a directory to traverse files in directory whose next level directory contains rule files with Suffix of cocci. Signed-off-by: zhongshiqi --- Changes in v2: 1.fix patch subject according to the

Re: [Cocci] [PATCH v2] coccicheck:support $COCCI being defined as a directory

2019-10-23 Thread Julia Lawall
On Thu, 24 Oct 2019, zhongshiqi wrote: > Put a modification in scripts/coccicheck which supports users in > configuring COCCI parameter as a directory to traverse files in > directory whose next level directory contains rule files with Suffix of > cocci. While I thought the original was fine, i

Re: [PATCH] coccicheck: Configuring COCCI parameter for supporting a directory search

2019-10-23 Thread Markus Elfring
> What is the relation between the last two if branches? A small addition is proposed for this bash script. > If the first one fails, does that mean that $COCCI has no definition? No. - It was checked if an empty sting was passed. A file system check is tried then to determine if a valid direct

Re: [PATCH] coccicheck: Configuring COCCI parameter for supporting a directory search

2019-10-23 Thread Markus Elfring
> This patch puts a modification in scripts/coccicheck which supports users > in configuring COCCI parameter as a directory to traverse files in directory. * I suggest to improve this change description according to a recommended “imperative mood”. https://git.kernel.org/pub/scm/linux/kernel/

Re: [Cocci] [PATCH] Configuring COCCI parameter as a directory issupportted

2019-10-23 Thread zhong.shiqi
Julia, Add a script to determine if $COCCI is a directory. If $COCCI is undefined, means first if branch success, then first if branch is executed. If $COCCI is defined, means that fails, then elif branch is executed. And then, The elif branch judges whether $COCCI is a

Re: [PATCH] Configuring COCCI parameter as a directory is supportted

2019-10-23 Thread Julia Lawall
On Wed, 23 Oct 2019, zhongshiqi wrote: > 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 > --- > scripts/coccicheck | 4 > 1 file changed, 4 insertion

[PATCH] Configuring COCCI parameter as a directory is supportted

2019-10-23 Thread zhongshiqi
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 --- scripts/coccicheck | 4 1 file changed, 4 insertions(+) diff --git a/scripts/coccicheck b/scripts/coccichec