]> git.ipfire.org Git - thirdparty/git.git/commit
meson: wire up static analysis via Coccinelle
authorPatrick Steinhardt <ps@pks.im>
Tue, 18 Feb 2025 07:45:56 +0000 (08:45 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 19:40:04 +0000 (11:40 -0800)
commitc1d6628c9433c09ff62f916f2b933ee12995e9d8
tree72ba0f53a27467a01951780a99ba8b395b9c4be9
parente9e924e581c8b6d07ab6429eba4684e35c108666
meson: wire up static analysis via Coccinelle

Wire up static analysis via Coccinelle via a new test target
"coccicheck". This target can be executed via `meson compile coccicheck`
and generates the semantic patch for us.

Note that we don't hardcode the list of source and header files that
shall be analyzed, and instead use git-ls-files(1) to find them for us.
This is because we also want to analyze files that may not get built on
the current platform, so finding all sources at configure time is easier
than introducing a new variable that tracks all sources, including those
which aren't being built.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/meson.build [new file with mode: 0644]
contrib/meson.build
meson_options.txt