Re: [PATCH v3 2/4] meson: move headers definition from 'contrib/coccinelle'
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Apr 15, 2025, 13:28 UTC
- Message-ID
- <23493ec4-fd9f-44ae-a81a-8851e495b427@gmail.com>
- In-Reply-To
- <20250414-505-wire-up-sparse-via-meson-v3-2-edc6e7f26745@gmail.com>
Hi Karthik
On 14/04/2025 22:16, Karthik Nayak wrote:
Show 9 quoted lines
> 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.
Show 11 quoted lines
> + ':!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
Show 5 quoted lines
> + ':!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
Show 9 quoted lines
> + 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
>