Sponsored Content
Skip to content

fix: More clang-tidy issues - #6992

Merged
bthomee merged 9 commits into
developfrom
mvadari/fix-tidy
Apr 22, 2026
Merged

fix: More clang-tidy issues#6992
bthomee merged 9 commits into
developfrom
mvadari/fix-tidy

Conversation

@mvadari

@mvadari mvadari commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Title pretty much says it all

No change in functionality, just clang-tidy things

Context of Change

Ran into several of these in PRs

API Impact

N/A

@mvadari
mvadari requested review from Copilot and godexsoft April 21, 2026 22:14
@mvadari mvadari added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Apr 21, 2026

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

Comment thread include/xrpl/tx/SignerEntries.h

Copilot AI 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.

Pull request overview

This PR addresses additional clang-tidy findings across xrpld, libxrpl, protocol headers, and tests by tightening include dependencies and ensuring deterministic member initialization.

Changes:

  • Add missing direct includes in multiple compilation units (protocol/ledger/rpc/app/test) to satisfy header/tooling requirements.
  • Initialize a number of class/struct members with in-class {} to silence uninitialized-member diagnostics.
  • Modernize a few spots (e.g., std::ranges::is_sorted, defaulted ctors, <=> for SignerEntry ordering) to satisfy tidy checks.

Reviewed changes

Copilot reviewed 59 out of 59 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/xrpld/rpc/handlers/orderbook/AMMInfo.cpp Add missing protocol feature include
src/xrpld/app/misc/detail/ValidatorList.cpp Add missing overlay message include
src/xrpld/app/misc/TxQ.h Value-initialize members to avoid uninitialized reads
src/xrpld/app/misc/FeeVoteImpl.cpp Add missing protocol include
src/xrpld/app/main/Application.cpp Add protocol includes used by implementation
src/xrpld/app/ledger/detail/OpenLedger.cpp Add missing protocol SField include
src/xrpld/app/ledger/detail/LedgerPersistence.cpp Add missing protocol includes
src/xrpld/app/ledger/detail/InboundLedger.cpp Add missing protocol includes
src/xrpld/app/ledger/detail/BuildLedger.cpp Add missing protocol includes
src/test/rpc/DepositAuthorized_test.cpp Add missing protocol include for constants/types
src/test/jtx/ter.h Value-initialize optional member
src/test/jtx/impl/amount.cpp Add missing <limits> include
src/test/jtx/credentials.h Value-initialize const vector member
src/test/jtx/ManualTimeKeeper.h Value-initialize atomic member
src/test/jtx/JTx.h Value-initialize members/containers
src/test/jtx/Env.h Value-initialize owning pointers/containers
src/test/core/Config_test.cpp Add missing system-parameters include
src/test/app/PayChan_test.cpp Include cleanup + add Zero header
src/libxrpl/tx/transactors/nft/NFTokenMint.cpp Include cleanup + add STObject/iterator
src/libxrpl/tx/transactors/lending/LoanDelete.cpp Add missing Number/STAmount includes
src/libxrpl/tx/transactors/delegate/DelegateSet.cpp Include cleanup + add Journal include
src/libxrpl/tx/transactors/account/SignerListSet.cpp Use std::ranges::is_sorted
src/libxrpl/tx/Transactor.cpp Add missing Serializer include
src/libxrpl/protocol/STValidation.cpp Add missing KeyType include
src/libxrpl/protocol/STNumber.cpp Add missing Rules include
src/libxrpl/protocol/STInteger.cpp Add missing <system_error> include
src/libxrpl/protocol/Quality.cpp Add missing Zero/limits includes
src/libxrpl/ledger/helpers/OfferHelpers.cpp Add missing LedgerFormats include
src/libxrpl/ledger/helpers/NFTokenHelpers.cpp Add missing UintTypes include
src/libxrpl/ledger/helpers/CredentialHelpers.cpp Include cleanup + add STObject include
src/libxrpl/ledger/PaymentSandbox.cpp Add missing Issue include
include/xrpl/tx/paths/detail/Steps.h Value-initialize FlowException::ter
include/xrpl/tx/applySteps.h Value-initialize result members
include/xrpl/tx/Transactor.h Value-initialize preflightResult
include/xrpl/tx/SignerEntries.h Replace operator< with <=> for ordering
include/xrpl/shamap/SHAMap.h Value-initialize internal containers/stacks
include/xrpl/rdb/DatabaseCon.h Value-initialize pointer member
include/xrpl/protocol/STPathSet.h Value-initialize internal vectors
include/xrpl/protocol/STBitString.h Value-initialize internal value
include/xrpl/protocol/STArray.h Value-initialize internal vector
include/xrpl/protocol/PathAsset.h Value-initialize variant
include/xrpl/protocol/KnownFormats.h Default ctor + in-class member initializers
include/xrpl/protocol/Book.h Value-initialize optional member
include/xrpl/ledger/detail/ReadViewFwdRange.h Value-initialize unique_ptr
include/xrpl/ledger/detail/RawStateTable.h Value-initialize unique_ptr
include/xrpl/ledger/detail/ApplyStateTable.h Value-initialize map member
include/xrpl/ledger/Dir.h Value-initialize iterator member
include/xrpl/ledger/CanonicalTXSet.h Value-initialize map member
include/xrpl/ledger/CachedView.h Value-initialize cache map
include/xrpl/core/PeerReservationTable.h Value-initialize unordered_set
include/xrpl/core/JobTypes.h Value-initialize map member
include/xrpl/core/ClosureCounter.h Value-initialize stored closure
include/xrpl/beast/unit_test/reporter.h Value-initialize vector member
include/xrpl/beast/core/LockFreeStack.h Default ctor + value-init node ptr
include/xrpl/basics/partitioned_unordered_map.h Value-initialize iterators
include/xrpl/basics/hardened_hash.h In-class seed init + defaulted ctor
include/xrpl/basics/TaggedCache.h Value-initialize time_points
include/xrpl/basics/SlabAllocator.h Value-initialize static_vector
include/xrpl/basics/Buffer.h Use Slice::empty() for clarity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/libxrpl/ledger/helpers/CredentialHelpers.cpp
Comment thread src/libxrpl/tx/transactors/nft/NFTokenMint.cpp
Comment thread src/libxrpl/tx/transactors/delegate/DelegateSet.cpp
Comment thread src/test/app/PayChan_test.cpp
@codecov

codecov Bot commented Apr 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.6%. Comparing base (4ab2077) to head (55cb245).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6992   +/-   ##
=======================================
  Coverage     82.6%   82.6%           
=======================================
  Files         1010    1010           
  Lines        79566   79566           
  Branches      7537    7531    -6     
=======================================
+ Hits         65696   65708   +12     
+ Misses       13870   13858   -12     
Files with missing lines Coverage Δ
include/xrpl/basics/SlabAllocator.h 93.2% <ø> (ø)
include/xrpl/basics/hardened_hash.h 100.0% <100.0%> (ø)
include/xrpl/basics/partitioned_unordered_map.h 100.0% <ø> (ø)
include/xrpl/beast/core/LockFreeStack.h 100.0% <ø> (ø)
include/xrpl/core/ClosureCounter.h 100.0% <ø> (ø)
include/xrpl/ledger/detail/ReadViewFwdRange.h 100.0% <ø> (ø)
include/xrpl/protocol/KnownFormats.h 93.2% <ø> (ø)
include/xrpl/protocol/STBitString.h 100.0% <ø> (ø)
include/xrpl/rdb/DatabaseCon.h 100.0% <ø> (ø)
include/xrpl/tx/SignerEntries.h 100.0% <100.0%> (ø)
... and 8 more

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

Copilot AI review requested due to automatic review settings April 22, 2026 13:59

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

@mvadari
mvadari requested a review from bthomee April 22, 2026 14:03
@mvadari

mvadari commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

@bthomee I made a bunch of changes to get tests to pass, you may want to re-review (should be mostly a subset of what you already reviewed)

Copilot AI 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.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/libxrpl/tx/transactors/nft/NFTokenMint.cpp Outdated
Comment thread src/libxrpl/ledger/helpers/CredentialHelpers.cpp Outdated
Comment thread include/xrpl/protocol/KnownFormats.h Outdated

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

Copilot AI review requested due to automatic review settings April 22, 2026 14:09

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

LGTM - clean tidy fixes.

Review by Claude Opus 4.6 · Prompt: V15

Copilot AI 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.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/xrpl/protocol/KnownFormats.h Outdated
@github-actions

Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.

@mvadari mvadari 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 Apr 22, 2026
@github-actions

Copy link
Copy Markdown

All conflicts have been resolved. Assigned reviewers can now start or resume their review.

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

@bthomee
bthomee added this pull request to the merge queue Apr 22, 2026
Merged via the queue into develop with commit 1c6cdc6 Apr 22, 2026
3 checks passed
@bthomee
bthomee deleted the mvadari/fix-tidy branch April 22, 2026 18:28
marek-foss-neti pushed a commit to marek-foss-neti/rippled that referenced this pull request May 5, 2026
@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
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. Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants