Repository navigation
build(clang-tidy): fix silently disabled checks and resulting findings - #1334
Merged
Merged
Conversation
castler
marked this pull request as ready for review
October 7, 2026 16:02
castler
requested review from
LittleHuba,
bemerybmw,
crimson11,
hoe-jo and
limdor
as code owners
October 7, 2026 16:02
castler
enabled auto-merge
October 7, 2026 16:02
castler
marked this pull request as draft
October 8, 2026 06:38
auto-merge was automatically disabled
October 8, 2026 06:38
Pull request was converted to draft
castler
force-pushed
the
fix_tidy_swallowed_checks
branch
from
October 8, 2026 09:31
d59b3a9 to
4a57d23
Compare
castler
marked this pull request as ready for review
October 8, 2026 09:33
castler
enabled auto-merge
October 8, 2026 09:33
bemerybmw
approved these changes
Oct 8, 2026
…ecks The Checks value is a folded YAML scalar, so a '#' line is not a comment: it is joined with the following line and the result is one glob that matches nothing. This silently disabled the first check after each section marker and after the '#modernize-...' lines: bugprone-use-after-move, bugprone-forwarding-reference-overload, cert-err52-cpp, bugprone-reserved-identifier, bugprone-assert-side-effect, misc-confusable-identifiers, modernize-unary-static-assert, modernize-use-nullptr Remove the comment lines from the block (documented above it instead) and list the intentionally disabled checks explicitly with a leading '-'. Also drop the *_PRD* macros from bugprone-assert-side-effect.AssertMacros: production-level asserts are always evaluated, so reporting their side effects as 'discarded in release builds' is a false positive. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes modernize-unary-static-assert. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…erations Cast 'other' to ProxyBase& and move that, so that only the base class subobject is moved. The derived members of 'other' are moved afterwards, which bugprone-use-after-move reported as use after move. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ount Fixes bugprone-assert-side-effect: evaluate value() once before the assert instead of inside the (possibly compiled out) condition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes bugprone-assert-side-effect: call DoesLogContainIncrementOrDecrementTransactions before the precondition instead of inside its (possibly compiled out) condition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes bugprone-reserved-identifier: ::testing::_ is the GoogleMock wildcard matcher, its name cannot be changed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Checksvalue in.clang-tidyis a folded>scalar, so#lines are not comments: they get joined with the next line into one glob that matches nothing. That silently disabled 8 listed checks (verified withclang-tidy --list-checksbefore/after):bugprone-use-after-move,bugprone-forwarding-reference-overload,cert-err52-cpp,bugprone-reserved-identifier,bugprone-assert-side-effect,misc-confusable-identifiers,modernize-unary-static-assert,modernize-use-nullptr.Commit 1 (config): remove comments from the
Checksblock (documented above it), list the intentionally disabled checks explicitly with-, and drop the*_PRD*macros frombugprone-assert-side-effect.AssertMacros(production-level asserts are always evaluated, so those were false positives).Then one commit per newly visible finding (7):
modernize-unary-static-assert:pointer_arithmetic_util.cppbugprone-use-after-move(3):GenericProxymove operations now cast toProxyBase&&so only the base subobject is movedbugprone-assert-side-effect(2): side-effecting calls moved out of the assert/precondition condition (subscription_subscribed_states.cpp,transaction_log_local_view.cpp)bugprone-reserved-identifier: justified NOLINT for GoogleMock's::testing::_Verified:
--config=cibuild of//score/mw/com/impl/...and//score/memory/shared/..., 68/68 local tests pass, clang-tidy aspect shows none of the 8 re-enabled checks firing.