lkml.org 
[lkml]   [2010]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] Add targets to use the Coccinelle checker
On 10.5.2010 18:24, Nicolas Palix wrote:
> Four targets are added. Each one generates a different
> output kind: context, patch, org, report.
> Every SmPL file in 'scripts/coccinelle' is given to the spatch frontend
> (located in the 'scripts' directory), and applied to the entire
> source tree.

I think it would be good to repeat the description of the four modes
here (the 0/4 mail won't appear in the changelog).


> + @if [ "$(COCCI)" = "" ] ; then \
> + find $(srctree)/scripts/coccinelle/ \
> + -name '*.cocci' -type f \
> + -exec $(srctree)/scripts/coccinelle.sh $(COCCINELLE) $(@:coccicheck-%=%) \{} $(srctree) \; ; \
> + else \
> + $(srctree)/scripts/coccinelle.sh $(COCCINELLE) $(@:coccicheck-%=%) $(COCCI) $(srctree) ; \
> + fi

Please sort the output of 'find' or use a shell glob instead. IMO the
order of tests should be stable (and thus easily diff-able) and not
change when you e.g. switch branches.


> +if [ -x "$SPATCH" ]; then
> +
> + echo "Processing `basename $COCCI` with option(s) \"$(OPT)\""

/home/mmarek/linux-2.6/scripts/coccinelle.sh: line 13: OPT: command not
found

Please remove the parentheses around OPT.


> + echo 'Message example to submit a patch:'
> + sed -e '/\/\/\//!d' -e 's|^///||' $COCCI
> +
> + echo ' The semantic patch that makes this change is available'
> + echo " in $FILE."
> + echo ''
> + echo ' More information about semantic patching is available at'
> + echo ' http://coccinelle.lip6.fr/'
> + echo ''
> +
> + $SPATCH -D $MODE -very_quiet -sp_file $COCCI $OPT -dir $DIR
> +
> +else
> + echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/'
> +fi

If 'spatch' is not available, you should exit with an error.

Thanks,
Michal

PS: Sorry for the delay, I didn't get around to to reviewing the v2 of
your patch early enough and then I was offline for two weeks.


\
 
 \ /
  Last update: 2010-06-03 11:53    [W:1.925 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site