summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNicolas Palix <npalix.work@gmail.com>2010-10-24 23:37:34 +0200
committerMichal Marek <mmarek@suse.cz>2010-10-28 00:32:23 +0200
commit062c1825a5f6673746efe5f0a5ea3803b0c316a9 (patch)
tree86ed102dd7b4f112aa61747e909e38c689f19ef5 /scripts
parent9dcf7990c2b8afe865d59f809a35a84d10f241f8 (diff)
Coccinelle: Add contextual message
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/coccicheck16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 7529af15672..1bb1a1bd2da 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -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
@@ -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
@@ -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'