* [PATCH 2/3] Coccinelle: Update the documentation
@ 2013-06-20 11:11 Nicolas Palix
2013-06-20 11:48 ` Sachin Kamat
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Palix @ 2013-06-20 11:11 UTC (permalink / raw)
To: Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek, cocci,
linux-kernel, Rob Landley, linux-doc
- The new default mode is 'report'.
- The available modes are detailed a bit more.
- Some information about the use of spatch options are
also given concerning the use of indexing tools.
Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>
---
Documentation/coccinelle.txt | 39 ++++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt
index 408439d..1aa9a40 100644
--- a/Documentation/coccinelle.txt
+++ b/Documentation/coccinelle.txt
@@ -48,7 +48,7 @@ A Coccinelle-specific target is defined in the top level
Makefile. This target is named 'coccicheck' and calls the 'coccicheck'
front-end in the 'scripts' directory.
-Four modes are defined: patch, report, context, and org. The mode to
+Four basic modes are defined: patch, report, context, and org. The mode to
use is specified by setting the MODE variable with 'MODE=<mode>'.
'patch' proposes a fix, when possible.
@@ -62,18 +62,24 @@ diff-like style.Lines of interest are indicated with '-'.
'org' generates a report in the Org mode format of Emacs.
Note that not all semantic patches implement all modes. For easy use
-of Coccinelle, the default mode is "chain" which tries the previous
-modes in the order above until one succeeds.
+of Coccinelle, the default mode is "report".
-To make a report for every semantic patch, run the following command:
+Two other modes provide some common combinaisons of these modes.
- make coccicheck MODE=report
+'chain' tries the previous modes in the order above until one succeeds.
-NB: The 'report' mode is the default one.
+'rep+ctxt' runs successively the report mode and the context mode.
+ It should be used with the C option (described later)
+ which checks the code on a file basis.
-To produce patches, run:
+Examples:
+ To make a report for every semantic patch, run the following command:
- make coccicheck MODE=patch
+ make coccicheck MODE=report
+
+ To produce patches, run:
+
+ make coccicheck MODE=patch
The coccicheck target applies every semantic patch available in the
@@ -129,26 +135,33 @@ To check only newly edited code, use the value 2 for the C flag, i.e.
make C=2 CHECK="scripts/coccicheck"
+In these modes, which works on a file basis, there is no information
+about semantic patches displayed, and no commit message proposed.
+
This runs every semantic patch in scripts/coccinelle by default. The
COCCI variable may additionally be used to only apply a single
semantic patch as shown in the previous section.
-The "chain" mode is the default. You can select another one with the
+The "report" mode is the default. You can select another one with the
MODE variable explained above.
-In this mode, there is no information about semantic patches
-displayed, and no commit message proposed.
-
Additional flags
~~~~~~~~~~~~~~~~~~
Additional flags can be passed to spatch through the SPFLAGS
variable.
- make SPFLAGS=--use_glimpse coccicheck
+ make SPFLAGS=--use-glimpse coccicheck
+ make SPFLAGS=--use-idutils coccicheck
See spatch --help to learn more about spatch options.
+Note that the '--use-glimpse' and '--use-idutils' options
+require external tools for indexing the code. None of them is
+thus active by default. However, by indexing the code with
+one of these tools, and according to the cocci file used,
+spatch could proceed the entire code base more quickly.
+
Proposing new semantic patches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] Coccinelle: Update the documentation
2013-06-20 11:11 [PATCH 2/3] Coccinelle: Update the documentation Nicolas Palix
@ 2013-06-20 11:48 ` Sachin Kamat
2013-06-20 12:00 ` [PATCH] " Nicolas Palix
0 siblings, 1 reply; 4+ messages in thread
From: Sachin Kamat @ 2013-06-20 11:48 UTC (permalink / raw)
To: Nicolas Palix
Cc: Julia Lawall, Gilles Muller, Michal Marek, cocci, linux-kernel,
Rob Landley, linux-doc
On 20 June 2013 16:41, Nicolas Palix <nicolas.palix@imag.fr> wrote:
> - The new default mode is 'report'.
> - The available modes are detailed a bit more.
> - Some information about the use of spatch options are
> also given concerning the use of indexing tools.
>
> Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>
> ---
> Documentation/coccinelle.txt | 39 ++++++++++++++++++++++++++-------------
> 1 file changed, 26 insertions(+), 13 deletions(-)
>
> diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt
> index 408439d..1aa9a40 100644
> --- a/Documentation/coccinelle.txt
> +++ b/Documentation/coccinelle.txt
> @@ -48,7 +48,7 @@ A Coccinelle-specific target is defined in the top level
> Makefile. This target is named 'coccicheck' and calls the 'coccicheck'
> front-end in the 'scripts' directory.
>
> -Four modes are defined: patch, report, context, and org. The mode to
> +Four basic modes are defined: patch, report, context, and org. The mode to
> use is specified by setting the MODE variable with 'MODE=<mode>'.
>
> 'patch' proposes a fix, when possible.
> @@ -62,18 +62,24 @@ diff-like style.Lines of interest are indicated with '-'.
> 'org' generates a report in the Org mode format of Emacs.
>
> Note that not all semantic patches implement all modes. For easy use
> -of Coccinelle, the default mode is "chain" which tries the previous
> -modes in the order above until one succeeds.
> +of Coccinelle, the default mode is "report".
>
> -To make a report for every semantic patch, run the following command:
> +Two other modes provide some common combinaisons of these modes.
>
s/combinaisons/combinations
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Coccinelle: Update the documentation
2013-06-20 11:48 ` Sachin Kamat
@ 2013-06-20 12:00 ` Nicolas Palix
2013-07-03 13:42 ` Michal Marek
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Palix @ 2013-06-20 12:00 UTC (permalink / raw)
To: Sachin Kamat, Julia Lawall, Gilles Muller, Michal Marek, cocci,
linux-kernel, Rob Landley, linux-doc
Cc: Nicolas Palix
- The new default mode is 'report'.
- The available modes are detailed a bit more.
- Some information about the use of spatch options are
also given concerning the use of indexing tools.
Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>
---
v2: Fix typo reported by Sachin Kamat
Documentation/coccinelle.txt | 39 ++++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt
index 408439d..81a329f 100644
--- a/Documentation/coccinelle.txt
+++ b/Documentation/coccinelle.txt
@@ -48,7 +48,7 @@ A Coccinelle-specific target is defined in the top level
Makefile. This target is named 'coccicheck' and calls the 'coccicheck'
front-end in the 'scripts' directory.
-Four modes are defined: patch, report, context, and org. The mode to
+Four basic modes are defined: patch, report, context, and org. The mode to
use is specified by setting the MODE variable with 'MODE=<mode>'.
'patch' proposes a fix, when possible.
@@ -62,18 +62,24 @@ diff-like style.Lines of interest are indicated with '-'.
'org' generates a report in the Org mode format of Emacs.
Note that not all semantic patches implement all modes. For easy use
-of Coccinelle, the default mode is "chain" which tries the previous
-modes in the order above until one succeeds.
+of Coccinelle, the default mode is "report".
-To make a report for every semantic patch, run the following command:
+Two other modes provide some common combinations of these modes.
- make coccicheck MODE=report
+'chain' tries the previous modes in the order above until one succeeds.
-NB: The 'report' mode is the default one.
+'rep+ctxt' runs successively the report mode and the context mode.
+ It should be used with the C option (described later)
+ which checks the code on a file basis.
-To produce patches, run:
+Examples:
+ To make a report for every semantic patch, run the following command:
- make coccicheck MODE=patch
+ make coccicheck MODE=report
+
+ To produce patches, run:
+
+ make coccicheck MODE=patch
The coccicheck target applies every semantic patch available in the
@@ -129,26 +135,33 @@ To check only newly edited code, use the value 2 for the C flag, i.e.
make C=2 CHECK="scripts/coccicheck"
+In these modes, which works on a file basis, there is no information
+about semantic patches displayed, and no commit message proposed.
+
This runs every semantic patch in scripts/coccinelle by default. The
COCCI variable may additionally be used to only apply a single
semantic patch as shown in the previous section.
-The "chain" mode is the default. You can select another one with the
+The "report" mode is the default. You can select another one with the
MODE variable explained above.
-In this mode, there is no information about semantic patches
-displayed, and no commit message proposed.
-
Additional flags
~~~~~~~~~~~~~~~~~~
Additional flags can be passed to spatch through the SPFLAGS
variable.
- make SPFLAGS=--use_glimpse coccicheck
+ make SPFLAGS=--use-glimpse coccicheck
+ make SPFLAGS=--use-idutils coccicheck
See spatch --help to learn more about spatch options.
+Note that the '--use-glimpse' and '--use-idutils' options
+require external tools for indexing the code. None of them is
+thus active by default. However, by indexing the code with
+one of these tools, and according to the cocci file used,
+spatch could proceed the entire code base more quickly.
+
Proposing new semantic patches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Coccinelle: Update the documentation
2013-06-20 12:00 ` [PATCH] " Nicolas Palix
@ 2013-07-03 13:42 ` Michal Marek
0 siblings, 0 replies; 4+ messages in thread
From: Michal Marek @ 2013-07-03 13:42 UTC (permalink / raw)
To: Nicolas Palix
Cc: Sachin Kamat, Julia Lawall, Gilles Muller, cocci, linux-kernel,
Rob Landley, linux-doc
On Thu, Jun 20, 2013 at 02:00:19PM +0200, Nicolas Palix wrote:
> - The new default mode is 'report'.
> - The available modes are detailed a bit more.
> - Some information about the use of spatch options are
> also given concerning the use of indexing tools.
>
> Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>
Applied to kbuild.git#misc, thanks.
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-03 13:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 11:11 [PATCH 2/3] Coccinelle: Update the documentation Nicolas Palix
2013-06-20 11:48 ` Sachin Kamat
2013-06-20 12:00 ` [PATCH] " Nicolas Palix
2013-07-03 13:42 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).