Commit Graph

1 Commits

Author SHA1 Message Date
Himanshu Jha dce9141fb1 Coccinelle: Add support for Coccinelle infrastructure
'coccicheck' target is used to initiate Coccinelle checker. It
can be called via four different modes that generate different
output corresponding the mode.

The four modes are:

* 'patch' proposes a fix, when possible.
* 'report' generates a list in the following format:
	file:line:column-column: message
* 'context' highlights lines of interest and their context in
   a diff-like style. Lines of interest are indicated with '-'.
* 'org' generates a report in the Org mode format of Emacs.

The 'coccicheck' front-end can be called with suitable arguments:

* --mode=<mode>: specify the mode for processsing.
* --cocci=<path/to/foo.cocci>: specify the SmPL file to use.
* --verbose=<1>: enable verbose output.

Run `./scripts/coccicheck --help` for more detailed info
on various options available.

With the above arguments the coccinelle transformation engine
runs on the entire/part of the source code tree depending on
various options supplied to the coccicheck sanity checker.

More detailed documentation can be found at:
doc/application/coccinelle.rst

Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-10-02 14:03:39 -07:00