Skip to content

Resolve several multiple-bool-args lints#4639

Merged
jasnell merged 3 commits intomainfrom
harris/2025-07-15-clang-tidy-multiple-bool-args
Jul 30, 2025
Merged

Resolve several multiple-bool-args lints#4639
jasnell merged 3 commits intomainfrom
harris/2025-07-15-clang-tidy-multiple-bool-args

Conversation

@harrishancock
Copy link
Collaborator

Soon, I intend to land a new clang-tidy plugin downstream which squawks if we have functions which accept more than one boolean parameter.

We run our clang-tidy with warnings-as-errors for as much of our codebase as we can, including some workerd directories. This PR resolves the lints which cropped up in workerd when I ran it.

In doing so, I discovered a couple minor bugs in our heap snapshot functionality.

@harrishancock harrishancock requested review from jasnell and mikea July 30, 2025 14:25
@harrishancock harrishancock requested review from a team as code owners July 30, 2025 14:25
@harrishancock harrishancock force-pushed the harris/2025-07-15-clang-tidy-multiple-bool-args branch from ba88f3c to 84fade2 Compare July 30, 2025 14:33
@harrishancock harrishancock force-pushed the harris/2025-07-15-clang-tidy-multiple-bool-args branch from 84fade2 to 1ce3f58 Compare July 30, 2025 15:04
This resolves a new downstream lint.
This resolves a new downstream lint. This also makes it a strong bool for good measure.
This resolves a new downstream lint.

This is not marked [nfc] because there are two bugfixes in this commit:
- The reportProgress flag is now being respected. Previously we were
  alwyas reporting progress.
- The exposeInternals flag is now being properly interpreted. Previously
  we were passing it, un-negated, to a parameter named hide_internals.

I switched to the options struct version of the V8 TakeHeapSnapshot()
function for greater clarity.
@harrishancock harrishancock force-pushed the harris/2025-07-15-clang-tidy-multiple-bool-args branch from 1ce3f58 to 1929408 Compare July 30, 2025 16:22
@jasnell jasnell merged commit a052152 into main Jul 30, 2025
21 checks passed
@jasnell jasnell deleted the harris/2025-07-15-clang-tidy-multiple-bool-args branch July 30, 2025 17:16
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.

2 participants