From: Sumera Priyadarsini <sylphrenadin@gmail.com>
To: julia.lawall@inria.fr
Cc: cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH 0/2] Add "use-patchdiff" option
Date: Wed, 26 May 2021 16:21:46 +0530 [thread overview]
Message-ID: <cover.1622024972.git.sylphrenadin@gmail.com> (raw)
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
next reply other threads:[~2021-05-26 10:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 10:51 Sumera Priyadarsini [this message]
2021-05-26 10:52 ` [Cocci] [PATCH 1/2] parsing_cocci: Add feature to check only modified files Sumera Priyadarsini
2021-05-26 10:53 ` [Cocci] [PATCH 2/2] docs: manual: Add option description in spatch_options Sumera Priyadarsini
2021-05-26 16:43 ` [Cocci] [PATCH 0/2] Add "use-patchdiff" option Markus Elfring
2021-07-01 18:42 ` Sumera Priyadarsini
2021-07-01 18:50 ` Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1622024972.git.sylphrenadin@gmail.com \
--to=sylphrenadin@gmail.com \
--cc=cocci@systeme.lip6.fr \
--cc=julia.lawall@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).