Skip to content

Commit

Permalink
Coccinelle: Add contextual message
Browse files Browse the repository at this point in the history
Change the message displayed to the user according
to the current mode used.

Fix trailing white-space and spelling

Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Nicolas Palix authored and Michal Marek committed Oct 27, 2010
1 parent 9dcf799 commit 062c182
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions scripts/coccicheck
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ "$MODE" = "" ] ; then
fi
MODE="chain"
elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
FLAGS="$FLAGS -no_show_diff"
FLAGS="$FLAGS -no_show_diff"
fi

if [ "$ONLINE" = "0" ] ; then
Expand All @@ -47,7 +47,7 @@ coccinelle () {

OPT=`grep "Option" $COCCI | cut -d':' -f2`

# The option '-parse_cocci' can be used to syntaxically check the SmPL files.
# The option '-parse_cocci' can be used to syntactically check the SmPL files.
#
# $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null

Expand All @@ -62,7 +62,17 @@ coccinelle () {

sed -ne 's|^///||p' $COCCI

echo ' The semantic patch that makes this change is available'
if [ "$MODE" = "patch" ] ; then
echo ' The semantic patch that makes this change is available'
elif [ "$MODE" = "report" ] ; then
echo ' The semantic patch that makes this report is available'
elif [ "$MODE" = "context" ] ; then
echo ' The semantic patch that spots this code is available'
elif [ "$MODE" = "org" ] ; then
echo ' The semantic patch that makes this Org report is available'
else
echo ' The semantic patch that makes this output is available'
fi
echo " in $FILE."
echo ''
echo ' More information about semantic patching is available at'
Expand Down

0 comments on commit 062c182

Please sign in to comment.