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
PWPhillip 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
> 
Previous: Karthik NayakNext: Karthik Nayak
Message 4 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.