Skip to content

ci: enable clang-tidy in macOS job, use nullptr#262

Open
Sjors wants to merge 2 commits intobitcoin-core:masterfrom
Sjors:2026/03/null
Open

ci: enable clang-tidy in macOS job, use nullptr#262
Sjors wants to merge 2 commits intobitcoin-core:masterfrom
Sjors:2026/03/null

Conversation

@Sjors
Copy link
Member

@Sjors Sjors commented Mar 20, 2026

The first commit reproduces #261:

/Users/runner/work/libmultiprocess/libmultiprocess/src/mp/util.cpp:84:25: error: use nullptr [modernize-use-nullptr,-warnings-as-errors]
   84 |     pthread_threadid_np(NULL, &tid);
      |                         ^~~~
      |                         nullptr
2 warnings generated.
Suppressed 1 warnings (1 in non-user code).
Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning treated as error

https://github.com/bitcoin-core/libmultiprocess/actions/runs/23348264051/job/67919536711?pr=262

Using clang-tidy in the macOS job increases the runtime from ~1 minute to 2.5 minutes, which shouldn't be a problem.

The second commit fixes it.

@DrahtBot
Copy link

DrahtBot commented Mar 20, 2026

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK pinheadmz

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

@Sjors Sjors changed the title ci: enable clang-tidy in macOS job ci: enable clang-tidy in macOS job, use nullptr Mar 20, 2026
@Sjors Sjors marked this pull request as ready for review March 20, 2026 14:54
@pinheadmz
Copy link

concept ACK, will test locally later today.

TIL DMP_ENABLE_CLANG_TIDY is a cmake option. Does that work in bitcoin core as well?

@hebasto
Copy link
Member

hebasto commented Mar 20, 2026

TIL DMP_ENABLE_CLANG_TIDY is a cmake option.

To be pedantic, the variable name is MP_ENABLE_CLANG_TIDY, and -D is a CMake option to set a variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants