cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] [PATCH V2 0/2] Add "use-patch-diff" option
@ 2021-07-13  9:27 Sumera Priyadarsini
  2021-07-13  9:28 ` [Cocci] [PATCH V2 1/2] parsing_cocci: Add feature to check only modified files Sumera Priyadarsini
  2021-07-13  9:29 ` [Cocci] [PATCH V2 2/2] docs: manual: Add option description in spatch_options Sumera Priyadarsini
  0 siblings, 2 replies; 3+ messages in thread
From: Sumera Priyadarsini @ 2021-07-13  9:27 UTC (permalink / raw)
  To: julia.lawall; +Cc: cocci

This patchset adds a feature to enable Coccinelle
to only check all those files in a directory which were
modified. It parses all the files obtained from the
output of "git diff" and checks them against the specified
cocci script.

An example for passing the "use-patchdiff" option is:

	spatch -D report --sp-file for_each_child.cocci --use-patchdiff drivers/gpu

One thing to note while using the command is that while it can be
invoked outside the target project directory, an absolute path
to the target folder should be specified in such cases.

Sumera Priyadarsini (2):
  parsing_cocci: Add feature to check only modified files
  docs: manual: Add option description in spatch_options

 Makefile                        |   2 +-
 docs/manual/spatch_options.tex  |   5 ++
 enter.ml                        |  17 +++--
 globals/flag.ml                 |   2 +-
 globals/flag.mli                |   2 +-
 ocaml/coccilib.mli              |   1 +
 parsing_cocci/get_constants2.ml |   1 +
 parsing_cocci/patch_diff.ml     | 118 ++++++++++++++++++++++++++++++++
 parsing_cocci/patch_diff.mli    |   9 +++
 9 files changed, 148 insertions(+), 9 deletions(-)
 create mode 100755 parsing_cocci/patch_diff.ml
 create mode 100644 parsing_cocci/patch_diff.mli

-- 
2.32.0

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-13  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13  9:27 [Cocci] [PATCH V2 0/2] Add "use-patch-diff" option Sumera Priyadarsini
2021-07-13  9:28 ` [Cocci] [PATCH V2 1/2] parsing_cocci: Add feature to check only modified files Sumera Priyadarsini
2021-07-13  9:29 ` [Cocci] [PATCH V2 2/2] docs: manual: Add option description in spatch_options Sumera Priyadarsini

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).