Skip to content

chore: Enable most clang-tidy bugprone checks#6929

Merged
ximinez merged 12 commits intoXRPLF:developfrom
godexsoft:chore/clang-tidy-bugprone2
Apr 14, 2026
Merged

chore: Enable most clang-tidy bugprone checks#6929
ximinez merged 12 commits intoXRPLF:developfrom
godexsoft:chore/clang-tidy-bugprone2

Conversation

@godexsoft
Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR enables the following clang-tidy checks:

  • bugprone-crtp-constructor-accessibility
  • bugprone-empty-catch
  • bugprone-forward-declaration-namespace
  • bugprone-macro-parentheses
  • bugprone-multi-level-implicit-pointer-conversion
  • bugprone-reserved-identifier
  • bugprone-return-const-ref-from-parameter
  • bugprone-sizeof-expression
  • bugprone-switch-missing-default-case
  • bugprone-inaccurate-erase
  • bugprone-inc-dec-in-conditions
  • bugprone-incorrect-enable-if
  • bugprone-incorrect-roundings
  • bugprone-infinite-loop
  • bugprone-integer-division

Context of Change

Fixing remaining clang-tidy checks after adding headers to the list of checked files.

API Impact

No impact.

@godexsoft godexsoft added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Apr 13, 2026

/** Replacement for std::thread that handles exceptions in unit tests. */
class thread
class Thread
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: 'thread' conflicted with an internal to 'boost' name and produced an error.
In any case identifier-naming check will later change all classes to CamelCase

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.6%. Comparing base (61fbde3) to head (c6ac6de).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/overlay/Compression.h 0.0% 2 Missing ⚠️
include/xrpl/basics/BasicConfig.h 66.7% 1 Missing ⚠️
include/xrpl/server/detail/BaseWSPeer.h 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6929   +/-   ##
=======================================
  Coverage     81.6%   81.6%           
=======================================
  Files         1010    1010           
  Lines        75969   75972    +3     
  Branches      7625    7622    -3     
=======================================
+ Hits         61983   61987    +4     
+ Misses       13986   13985    -1     
Files with missing lines Coverage Δ
include/xrpl/basics/CountedObject.h 100.0% <ø> (ø)
include/xrpl/basics/Log.h 71.4% <ø> (ø)
include/xrpl/basics/SlabAllocator.h 93.4% <100.0%> (ø)
...east/container/detail/aged_associative_container.h 100.0% <100.0%> (ø)
...pl/beast/container/detail/aged_ordered_container.h 97.4% <100.0%> (ø)
include/xrpl/beast/core/List.h 92.7% <100.0%> (+0.1%) ⬆️
include/xrpl/beast/hash/hash_append.h 100.0% <100.0%> (ø)
include/xrpl/beast/rfc2616.h 72.1% <100.0%> (+0.3%) ⬆️
include/xrpl/beast/xor_shift_engine.h 95.7% <100.0%> (ø)
include/xrpl/protocol/ApiVersion.h 100.0% <ø> (ø)
... and 16 more

... and 2 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@mathbunnyru mathbunnyru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing major, a few comments

Comment thread include/xrpl/beast/core/List.h Outdated
Comment thread include/xrpl/basics/CountedObject.h
Comment thread include/xrpl/beast/container/detail/aged_ordered_container.h
Comment thread include/xrpl/beast/core/List.h
Comment thread include/xrpl/protocol/LedgerFormats.h
Comment thread include/xrpl/basics/BasicConfig.h Outdated
@godexsoft godexsoft requested a review from mathbunnyru April 14, 2026 12:55
Comment thread include/xrpl/protocol/Feature.h
@mvadari mvadari removed the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Apr 14, 2026
@godexsoft godexsoft added Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. labels Apr 14, 2026
@ximinez ximinez added this pull request to the merge queue Apr 14, 2026
Merged via the queue into XRPLF:develop with commit 6a0ce46 Apr 14, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants