Hi Karthik
On 14/04/2025 22:16, Karthik Nayak wrote:
diff --git a/meson.build b/meson.build
index e98cfa4909..3ca5d01071 100644
--- a/meson.build
+++ b/meson.build
@@ -633,6 +633,28 @@ builtin_sources = [
'builtin/write-tree.c',
]
+third_party_sources = [
This is not the fault of this patch but I found this name rather
confusing as it is not a list of sources but a list of exclude patterns.
Calling it "third_party_excludes" would be clearer to me at least.
+ ':!contrib',
+ ':!compat/inet_ntop.c',
+ ':!compat/inet_pton.c',
+ ':!compat/nedmalloc',
+ ':!compat/obstack.*',
+ ':!compat/poll',
+ ':!compat/regex',
+ ':!sha1collisiondetection',
+ ':!sha1dc',
+ ':!t/unit-tests/clar',
+ ':!t/unit-tests/clar',
Again not a new problem but this line is a duplicate
+ ':!t/t[0-9][0-9][0-9][0-9]*',
+]
+
+if git.found()
+ headers = []
This is called "headers" but it is only really the subset of our headers
that we want to run static analysis on. Maybe we could call it
"headers_to_check" or something that makes it clearer what the list is for.
Best Wishes
Phillip
+ foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_sources, check: true).stdout().split()
+ headers += header
+ endforeach
+endif
+
if not get_option('breaking_changes')
builtin_sources += 'builtin/pack-redundant.c'
endif