Sponsored Content
Skip to content

refactor: Add simple clang-tidy readability checks - #6556

Merged
bthomee merged 15 commits into
XRPLF:developfrom
godexsoft:refactor/clang-tidy-readability-1
Mar 18, 2026
Merged

refactor: Add simple clang-tidy readability checks#6556
bthomee merged 15 commits into
XRPLF:developfrom
godexsoft:refactor/clang-tidy-readability-1

Conversation

@godexsoft

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR enables the following clang-tidy checks:

  • readability-avoid-nested-conditional-operator,
  • readability-avoid-return-with-void-value,
  • readability-braces-around-statements,
  • readability-const-return-type,
  • readability-container-contains,
  • readability-container-size-empty,
  • readability-else-after-return,
  • readability-make-member-function-const,
  • readability-redundant-casting,
  • readability-redundant-inline-specifier,
  • readability-redundant-member-init,
  • readability-redundant-string-init,
  • readability-reference-to-constructed-temporary,
  • readability-static-definition

API Impact

No impact.

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

codecov Bot commented Mar 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.96147% with 245 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.7%. Comparing base (b92a9a3) to head (35f98ba).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/overlay/detail/PeerImp.cpp 0.0% 99 Missing ⚠️
src/xrpld/overlay/detail/ConnectAttempt.cpp 0.0% 64 Missing ⚠️
src/xrpld/overlay/detail/OverlayImpl.cpp 12.5% 21 Missing ⚠️
src/xrpld/app/misc/detail/ValidatorList.cpp 81.6% 9 Missing ⚠️
src/xrpld/app/ledger/detail/LedgerDeltaAcquire.cpp 16.7% 5 Missing ⚠️
src/xrpld/app/rdb/backend/detail/Node.cpp 16.7% 5 Missing ⚠️
src/xrpld/app/misc/detail/WorkSSL.cpp 0.0% 4 Missing ⚠️
src/xrpld/app/paths/detail/PaySteps.cpp 0.0% 4 Missing ⚠️
src/xrpld/rpc/detail/RPCLedgerHelpers.cpp 20.0% 4 Missing ⚠️
src/xrpld/app/misc/NegativeUNLVote.cpp 75.0% 3 Missing ⚠️
... and 21 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6556     +/-   ##
=========================================
- Coverage     79.8%   79.7%   -0.1%     
=========================================
  Files          878     878             
  Lines        68031   68116     +85     
  Branches      7552    7556      +4     
=========================================
- Hits         54313   54312      -1     
- Misses       13718   13804     +86     
Files with missing lines Coverage Δ
include/xrpl/protocol/STObject.h 93.7% <ø> (ø)
include/xrpl/server/InfoSub.h 100.0% <ø> (ø)
include/xrpl/tx/invariants/InvariantCheck.h 100.0% <ø> (ø)
src/libxrpl/basics/BasicConfig.cpp 87.9% <100.0%> (ø)
src/libxrpl/basics/Log.cpp 18.0% <ø> (ø)
src/libxrpl/basics/MallocTrim.cpp 92.3% <100.0%> (+0.6%) ⬆️
src/libxrpl/basics/Number.cpp 98.7% <100.0%> (ø)
src/libxrpl/basics/ResolverAsio.cpp 91.0% <100.0%> (ø)
src/libxrpl/basics/base64.cpp 100.0% <100.0%> (ø)
src/libxrpl/basics/make_SSLContext.cpp 56.3% <ø> (ø)
... and 170 more

... and 28 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.

@godexsoft
godexsoft marked this pull request as ready for review March 18, 2026 14:32
@godexsoft godexsoft removed the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Mar 18, 2026

@kuznetsss kuznetsss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

@godexsoft godexsoft added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Mar 18, 2026
@bthomee
bthomee enabled auto-merge (squash) March 18, 2026 15:03
Comment thread src/xrpld/overlay/detail/OverlayImpl.cpp Outdated
@godexsoft
godexsoft requested a review from mathbunnyru March 18, 2026 15:46
@bthomee
bthomee disabled auto-merge March 18, 2026 15:46

@mathbunnyru mathbunnyru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is pretty impossible to review, but random sampling LGTM

@bthomee
bthomee enabled auto-merge (squash) March 18, 2026 15:51
@bthomee
bthomee merged commit 57e4cbb into XRPLF:develop Mar 18, 2026
2 of 3 checks passed
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
This change enables the following clang-tidy checks:
-  readability-avoid-nested-conditional-operator,
-  readability-avoid-return-with-void-value,
-  readability-braces-around-statements,
-  readability-const-return-type,
-  readability-container-contains,
-  readability-container-size-empty,
-  readability-else-after-return,
-  readability-make-member-function-const,
-  readability-redundant-casting,
-  readability-redundant-inline-specifier,
-  readability-redundant-member-init,
-  readability-redundant-string-init,
-  readability-reference-to-constructed-temporary,
-  readability-static-definition
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.

5 participants