git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 2/4] meson: move headers definition from 'contrib/coccinelle'

From
Karthik Nayak <karthik.188@gmail.com>
Date
Apr 20, 2025, 10:09 UTC
Message-ID
<CAOLa=ZRchwJWQfLDCMASEe9RWMOKDQvTfXaKqO=Shy=jhWMNaQ@mail.gmail.com>
In-Reply-To
<23493ec4-fd9f-44ae-a81a-8851e495b427@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 17 quoted lines
> 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.
>

This seems to map what the Makefile has, but I would agree, that this should be renamed.

Show 14 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
>

Fair, considering we're touching these fields, I will add an additional commit to simply cleanup these two issues.

Show 10 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.
>
Agreed, will rename. Thanks!
Show 13 quoted lines
> 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
>>
Previous: Phillip WoodNext: Karthik Nayak
Message 5 of 13 in “meson: add corresponding target for Makefile's hdr-check”
  1. 0/4 meson: add corresponding target for Makefile's hdr-checkKarthik Nayak, Apr 14, 2025
  2. 1/4 coccinelle: meson: rename variables to be more specificKarthik Nayak, Apr 14, 2025
  3. 2/4 meson: move headers definition from 'contrib/coccinelle'Karthik Nayak, Apr 14, 2025
  4. Phillip WoodApr 15, 2025
  5. Karthik NayakApr 20, 2025
  6. 3/4 meson: add support for 'hdr-check'Karthik Nayak, Apr 14, 2025
  7. Junio C HamanoApr 14, 2025
  8. Karthik NayakApr 15, 2025
  9. phillip.wood123@gmail.comApr 15, 2025
  10. Karthik NayakApr 20, 2025
  11. 4/4 makefile/meson: add 'check-headers' as alias for 'hdr-check'Karthik Nayak, Apr 14, 2025
  12. phillip.wood123@gmail.comApr 15, 2025
  13. Karthik NayakApr 20, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.