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 as. 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.31.1 _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci