Skip to content

Commit

Permalink
Coccinelle: Use the -no_show_diff option for org and report mode
Browse files Browse the repository at this point in the history
This allows to write the semantic patches with code sharing
for the matching parts.

Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
npalix authored and michal42 committed Oct 13, 2010
1 parent 2c1160c commit 03ee0c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/coccicheck
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if [ "$MODE" = "" ] ; then
echo 'You can specify the mode with "make coccicheck MODE=<mode>"'
fi
MODE="chain"
elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
FLAGS="$FLAGS -no_show_diff"
fi

if [ "$ONLINE" = "0" ] ; then
Expand Down Expand Up @@ -75,10 +77,10 @@ coccinelle () {
fi

if [ "$MODE" = "chain" ] ; then
$SPATCH -D patch $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
$SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
$SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
$SPATCH -D org $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
$SPATCH -D patch $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
$SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \
$SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
$SPATCH -D org $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1
else
$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
fi
Expand Down

0 comments on commit 03ee0c4

Please sign in to comment.