Coccinelle: Improve user information with a new kind of comment
PATCH 2/5 Coccinelle: Improve user information with a new kind of comment
Improve user information with a new kind of comment about semantic patch output.
Fix spelling.
--- scripts/coccicheck | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
scripts/coccicheck +7 -2
@@ -25,7 +25,7 @@ fi if [ "$MODE" = "" ] ; then if [ "$ONLINE" = "0" ] ; then - echo 'You have not explicitly specify the mode to use. Fallback to "report".' + echo 'You have not explicitly specified the mode to use. Fallback to "report".' echo 'You can specify the mode with "make coccicheck MODE=<mode>"' echo 'Available modes are: report, patch, context, org' fi
@@ -52,7 +52,12 @@ coccinelle () { FILE=`echo $COCCI | sed "s|$srctree/||"` - echo "Processing `basename $COCCI` with option(s) \"$OPT\"" + echo "Processing `basename $COCCI`" + echo "with option(s) \"$OPT\"" + echo 'Semantic patch information:' + + sed -e '/\/\/#/!d' -e 's|^//#||' $COCCI + echo 'Message example to submit a patch:' sed -e '/\/\/\//!d' -e 's|^///||' $COCCI
Signature · 1 line
1.7.0.4
Quoted 25 lines · Nicolas Palix
Improve user information with a new kind of comment about semantic patch output.
Fix spelling.
Signed-off-by Nicolas Palix <[email protected]>Signed-off-by Julia Lawall <[email protected]>--- scripts/coccicheck | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)scripts/coccicheck +1
-1@@ -25,7 +25,7 @@ fi if [ "$MODE" = "" ] ; then if [ "$ONLINE" = "0" ] ; then - echo 'You have not explicitly specify the mode to use. Fallback to "report".' + echo 'You have not explicitly specified the mode to use. Fallback to "report".' echo 'You can specify the mode with "make coccicheck MODE=<mode>"' echo 'Available modes are: report, patch, context, org' fi
scripts/coccicheck coccinelle () { · line 59
Quoted 9 lines
scripts/coccicheck +5
-1@@ -52,7 +52,12 @@ coccinelle () { FILE=`echo $COCCI | sed "s|$srctree/||"` - echo "Processing `basename $COCCI` with option(s) \"$OPT\"" + echo "Processing `basename $COCCI`" + echo "with option(s) \"$OPT\"" + echo 'Semantic patch information:' + + sed -e '/\/\/#/!d' -e 's|^//#||' $COCCI
sed -ne 's|^//#||p' $COCCI :)
But I would put this after the "Message example to submit a patch". free.cocci has the information in this order and it makes more sense this way IMO (first general information, then details). And it would be nice to only display the "Semantic patch information:" line if there actually is some additional information in the semantic patch file. Otherwise, the series looks OK to me.
scripts/coccicheck coccinelle () { · line 63
Quoted 4 lines
scripts/coccicheck +1
-0+ echo 'Message example to submit a patch:' sed -e '/\/\/\//!d' -e 's|^///||' $COCCI
Michal