Skip to contentSkip to conversation

documentation: coccinelle: Improve command example

PATCH In review Sumera Priyadarsini 2 participants 2 messages Aug 7, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 documentation: coccinelle: Improve command example

This patch modifies the coccinelle documentation to add further description for the usage of the C variable flags by coccicheck.

---
 Documentation/dev-tools/coccinelle.rst | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/dev-tools/coccinelle.rst +4 -1
index 6c791af1c859..dfc5d390307b 100644
@@ -177,9 +177,12 @@ For example, to check drivers/net/wireless/ one may write::
 To apply Coccinelle on a file basis, instead of a directory basis, the
 following command may be used::
 
+To check only recompiled files, use the value 1 for the C flag, i.e.::
+
     make C=1 CHECK="scripts/coccicheck"
 
-To check only newly edited code, use the value 2 for the C flag, i.e.::
+To check sourcefiles regardless of whether they are recompiled or not, 
+use the value 2 for the C flag, i.e.::
 
     make C=2 CHECK="scripts/coccicheck"
 
Signature · 6 lines
2.17.1

_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci
maintainer
#1 lore raw
Quoted 15 lines · Sumera Priyadarsini

This patch modifies the coccinelle documentation to add further description for the usage of the C variable flags by coccicheck.

---
 Documentation/dev-tools/coccinelle.rst | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/dev-tools/coccinelle.rst +0 -0
index 6c791af1c859..dfc5d390307b 100644
@@ -177,9 +177,12 @@ For example, to check drivers/net/wireless/ one may write::
 To apply Coccinelle on a file basis, instead of a directory basis, the
 following command may be used::

Documentation/dev-tools/coccinelle.rst For example, to check drivers/net/wireless/ one may write:: · line 187

Quoted 10 lines
Documentation/dev-tools/coccinelle.rst +4 -1
 
+To check only recompiled files, use the value 1 for the C flag, i.e.::
+
     make C=1 CHECK="scripts/coccicheck"
 
-To check only newly edited code, use the value 2 for the C flag, i.e.::
+To check sourcefiles regardless of whether they are recompiled or not,
+use the value 2 for the C flag, i.e.::
 
     make C=2 CHECK="scripts/coccicheck"

I'm not sure that this is clear enough. Should you give an example with a specific file? The command as presented seems to work on all files having the given property.

I'm also not sure to understand the work "recompiled". It's in the past tense, so it seems like it is talking about files that have already been compiled more than once (ie, compiled the first time and then recompiled the second time). Maybe it would be clearer to say "files that make considers need to be recompiled".

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci