Sponsored Content
Skip to content

style: More clang-tidy identifier renaming - #7290

Merged
bthomee merged 4 commits into
XRPLF:developfrom
godexsoft:chore/clang-tidy-rename-identifiers2
May 20, 2026
Merged

style: More clang-tidy identifier renaming#7290
bthomee merged 4 commits into
XRPLF:developfrom
godexsoft:chore/clang-tidy-rename-identifiers2

Conversation

@godexsoft

Copy link
Copy Markdown
Contributor

High Level Overview of Change

@kuznetsss noticed that some member variables are still misaligned with our configuration. Turns out clang-tidy does not respect the readability-identifier-naming.MemberCase: camelBack correctly and requires few extra lines for public/protected/private members when suffix is setup for those.

API Impact

No impact.

@godexsoft godexsoft added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label May 18, 2026
@godexsoft godexsoft changed the title More identifier renamings chore: More clang-tidy identifier renaming May 18, 2026
@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.85943% with 212 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.1%. Comparing base (1e45d36) to head (68f6d63).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/core/detail/Config.cpp 63.5% 50 Missing ⚠️
src/xrpld/overlay/detail/ProtocolMessage.h 25.0% 21 Missing ⚠️
src/xrpld/app/misc/NetworkOPs.cpp 52.6% 18 Missing ⚠️
include/xrpl/resource/detail/Logic.h 6.2% 15 Missing ⚠️
src/libxrpl/beast/insight/StatsDCollector.cpp 0.0% 10 Missing ⚠️
include/xrpl/server/detail/Door.h 40.0% 9 Missing ⚠️
src/xrpld/overlay/detail/OverlayImpl.cpp 60.9% 9 Missing ⚠️
src/xrpld/overlay/detail/PeerImp.h 0.0% 9 Missing ⚠️
src/xrpld/app/ledger/detail/LedgerMaster.cpp 61.1% 7 Missing ⚠️
src/xrpld/overlay/detail/PeerImp.cpp 53.3% 7 Missing ⚠️
... and 23 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #7290     +/-   ##
=========================================
- Coverage     82.1%   82.1%   -0.0%     
=========================================
  Files         1010    1010             
  Lines        76164   76157      -7     
  Branches      7423    7416      -7     
=========================================
- Hits         62509   62495     -14     
- Misses       13655   13662      +7     
Files with missing lines Coverage Δ
include/xrpl/basics/TaggedCache.h 100.0% <100.0%> (ø)
include/xrpl/basics/scope.h 100.0% <100.0%> (ø)
include/xrpl/core/Coro.ipp 100.0% <100.0%> (ø)
include/xrpl/core/JobQueue.h 100.0% <ø> (ø)
include/xrpl/ledger/BookDirs.h 100.0% <100.0%> (ø)
include/xrpl/ledger/OpenView.h 100.0% <ø> (ø)
include/xrpl/ledger/detail/RawStateTable.h 100.0% <100.0%> (ø)
include/xrpl/protocol/ErrorCodes.h 100.0% <ø> (ø)
include/xrpl/protocol/STPathSet.h 99.2% <100.0%> (ø)
include/xrpl/protocol/STTx.h 100.0% <100.0%> (ø)
... and 81 more

... and 5 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 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 updates identifier naming to align the codebase with clang-tidy’s readability-identifier-naming configuration (including adding explicit Public/Protected/Private member case rules) and then performs broad, mechanical renames across runtime and test code to match those rules.

Changes:

  • Extend .clang-tidy naming rules to explicitly set Public/Protected/Private member case handling.
  • Rename many member variables and config fields from underscore/SCREAMING_SNAKE patterns to camelBack (and apply suffix rules where appropriate).
  • Update call sites and unit tests to use the new member/config names.

Reviewed changes

Copilot reviewed 160 out of 160 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.clang-tidy Add explicit Public/Protected/Private member case options.
include/xrpl/beast/unit_test/reporter.h Rename result-tracking members to camelBack.
include/xrpl/basics/scope.h Rename Scope* internal members to camelBack.
include/xrpl/basics/TaggedCache.h Rename stats/entry fields to camelBack.
include/xrpl/basics/TaggedCache.ipp Update TaggedCache implementation to match renamed fields.
include/xrpl/core/Coro.ipp Rename coroutine mutex member to camelBack.
include/xrpl/core/Job.h Rename queue_time_ member to camelBack.
include/xrpl/core/JobQueue.h Rename job-count gauge and mutex member to camelBack.
include/xrpl/ledger/BookDirs.h Rename iterator/root tracking members to camelBack.
include/xrpl/ledger/detail/RawStateTable.h Rename PMR resource pointer member to camelBack.
include/xrpl/ledger/OpenView.h Rename PMR resource pointer member to camelBack.
include/xrpl/net/HTTPClientSSLContext.h Rename SSL context member to camelBack.
include/xrpl/protocol/Book.h Rename hasher data members to camelBack.
include/xrpl/protocol/ErrorCodes.h Rename ErrorInfo HTTP status member to camelBack.
include/xrpl/protocol/STPathSet.h Rename STPathElement cached fields to camelBack.
include/xrpl/protocol/STTx.h Rename private tx type member to camelBack.
include/xrpl/resource/detail/Entry.h Rename balance fields to camelBack.
include/xrpl/resource/detail/Key.h Rename hasher member to camelBack.
include/xrpl/resource/detail/Logic.h Update resource logic to use renamed Entry fields.
include/xrpl/server/Handoff.h Rename keep-alive field to camelBack.
include/xrpl/server/Port.h Rename Port/ParsedPort public fields to camelBack.
include/xrpl/server/detail/BaseHTTPPeer.h Rename peer internals (remote address, buffers, counters) to camelBack.
include/xrpl/server/detail/BasePeer.h Rename remote address member to camelBack.
include/xrpl/server/detail/BaseWSPeer.h Rename websocket peer internals to camelBack; update Port option access.
include/xrpl/server/detail/Door.h Rename accept throttling fields and remote address member to camelBack.
include/xrpl/server/detail/PlainHTTPPeer.h Update to renamed BaseHTTPPeer/Handoff members.
include/xrpl/server/detail/ServerImpl.h Rename io_context member to camelBack and update usage.
include/xrpl/server/detail/SSLHTTPPeer.h Rename SSL HTTP peer stream ptr/read buffer/request count/remote addr uses.
include/xrpl/server/detail/SSLWSPeer.h Rename SSL WS peer stream ptr member to camelBack.
src/libxrpl/basics/ResolverAsio.cpp Rename resolver internals (ioContext, stopCalled, etc.).
src/libxrpl/beast/insight/StatsDCollector.cpp Rename StatsD collector io_context and gauge tracking fields.
src/libxrpl/core/detail/Job.cpp Rename queue time member to camelBack.
src/libxrpl/core/detail/JobQueue.cpp Rename gauge member to camelBack and update collection code.
src/libxrpl/ledger/BookDirs.cpp Rename iterator tracking fields to camelBack and update traversal logic.
src/libxrpl/ledger/OpenView.cpp Rename PMR resource pointer member to camelBack.
src/libxrpl/protocol/ErrorCodes.cpp Update ErrorCodes accessor to renamed httpStatus field.
src/libxrpl/protocol/STTx.cpp Rename tx type member to camelBack and update uses.
src/libxrpl/server/Port.cpp Update port parsing/printing code to renamed Port/ParsedPort members.
src/test/app/AMM_test.cpp Update fee config access to fees.referenceFee.
src/test/app/AMMMPT_test.cpp Rename test locals/struct fields to camelBack; update fees config access.
src/test/app/LedgerHistory_test.cpp Update fees config access to fees.toFees().
src/test/app/LedgerLoad_test.cpp Update startup/ledger/trap hash config fields to camelBack.
src/test/app/LedgerMaster_test.cpp Update networkId and fees config fields to camelBack.
src/test/app/LedgerReplay_test.cpp Update ledgerReplay config access in tests.
src/test/app/LoadFeeTrack_test.cpp Update fees config access to fees.referenceFee.
src/test/app/MPToken_test.cpp Update fees config access to fees.referenceFee.
src/test/app/NetworkID_test.cpp Update networkId config field to camelBack.
src/test/app/Path_test.cpp Update path search config fields to camelBack.
src/test/app/PathMPT_test.cpp Update path search config fields to camelBack.
src/test/app/RCLValidations_test.cpp Update fees config access to fees.toFees().
src/test/app/Regression_test.cpp Update fees config access to fees.toFees() / fees.referenceFee.
src/test/app/SHAMapStore_test.cpp Update ledgerHistory config field to camelBack.
src/test/app/Transaction_ordering_test.cpp Update forceMultiThread config field to camelBack.
src/test/app/TxQ_test.cpp Update fees config access to fees.referenceFee.
src/test/app/ValidatorList_test.cpp Update protocol header field access to renamed messageType.
src/test/consensus/Consensus_test.cpp Update consensus parms member access to camelBack.
src/test/consensus/Validations_test.cpp Update validation parms member access to camelBack.
src/test/core/Coroutine_test.cpp Update forceMultiThread config field to camelBack.
src/test/csf/Scheduler.h Rename intrusive container member from by_when_ to byWhen_.
src/test/jtx/impl/AMMTest.cpp Update path search config fields to camelBack.
src/test/jtx/impl/Env.cpp Update SSL verify config fields to camelBack.
src/test/jtx/impl/envconfig.cpp Update unit-test config defaults to renamed fees / betaRpcApi / sslVerify / ioWorkers.
src/test/jtx/impl/JSONRPCClient.cpp Rename rpc version member to camelBack and update usage.
src/test/jtx/impl/permissioned_dex.cpp Rename USD IOU member to usd and update trust/pay usage.
src/test/jtx/impl/TestHelpers.cpp Update path search config fields to camelBack.
src/test/jtx/impl/WSClient.cpp Rename rpc version member to camelBack and update usage.
src/test/jtx/impl/xchain_bridge.cpp Rename alt signers/reward fields to camelBack and update ctor init.
src/test/jtx/permissioned_dex.h Rename USD IOU member to usd.
src/test/jtx/xchain_bridge.h Rename test fixture fields to camelBack.
src/test/ledger/SkipList_test.cpp Update fees config access to fees.toFees().
src/test/ledger/View_test.cpp Update fees config access to fees.toFees().
src/test/nodestore/Database_test.cpp Update ledgerHistory config field to camelBack.
src/test/nodestore/Timing_test.cpp Rename distribution and default parameter members to camelBack.
src/test/overlay/compression_test.cpp Update protocol header field access and config fields to camelBack.
src/test/overlay/short_read_test.cpp Rename io_context member to ioContext_ and update dependent objects.
src/test/overlay/tx_reduce_relay_test.cpp Update tx reduce-relay config fields and rename buffer member.
src/test/peerfinder/PeerFinder_test.cpp Update peers config field names to camelBack.
src/test/rpc/AccountTx_test.cpp Update fees config access to fees.referenceFee.
src/test/rpc/Book_test.cpp Update PermissionedDEX USD member access to usd.
src/test/rpc/DeliveredAmount_test.cpp Update fees config access to fees.referenceFee.
src/test/rpc/JSONRPC_test.cpp Update networkId and fees config fields to camelBack.
src/test/rpc/LedgerClosed_test.cpp Update fees config access to fees.referenceFee.
src/test/rpc/LedgerEntry_test.cpp Update fees and startup config fields to camelBack.
src/test/rpc/LedgerRequest_test.cpp Update fees and nodeSize config fields to camelBack.
src/test/rpc/LedgerRPC_test.cpp Update fees config access to fees.referenceFee.
src/test/rpc/NoRippleCheck_test.cpp Update renamed resource entry field to localBalance.
src/test/rpc/RPCCall_test.cpp Update networkId config field to camelBack.
src/test/rpc/Simulate_test.cpp Update networkId config field to camelBack.
src/test/rpc/Subscribe_test.cpp Update fees config access and PermissionedDEX USD member access.
src/test/rpc/Transaction_test.cpp Update networkId and fees config fields to camelBack.
src/test/rpc/TransactionEntry_test.cpp Update fees config access to fees.referenceFee.
src/test/rpc/Transaction_test.cpp Update fee/network config access to camelBack.
src/test/rpc/Version_test.cpp Update betaRpcApi config field usage in tests.
src/test/server/ServerStatus_test.cpp Update elbSupport config field usage in tests.
src/test/server/Server_test.cpp Rename io_context member to ioContext_ in helper thread.
src/test/unit_test/multi_runner.h Rename shared-memory and queue members to camelBack.
src/xrpld/app/ledger/LedgerHistory.cpp Update cache/counter member names and fees config access.
src/xrpld/app/ledger/LedgerHistory.h Rename cache/counter members to camelBack.
src/xrpld/app/ledger/LedgerMaster.h Rename internal cache/config members to camelBack.
src/xrpld/app/ledger/OpenLedger.h Rename mutex members to camelBack.
src/xrpld/app/ledger/detail/LedgerCleaner.cpp Update fees config access to fees.toFees().
src/xrpld/app/ledger/detail/LedgerMaster.cpp Update config accesses and rename internal members to camelBack.
src/xrpld/app/ledger/detail/OpenLedger.cpp Update mutex usage to renamed members.
src/xrpld/app/main/BasicApp.cpp Rename io_context member to ioContext_ and update worker setup.
src/xrpld/app/main/BasicApp.h Rename io_context member to ioContext_ and getter return.
src/xrpld/app/main/Main.cpp Update many Config fields (startup, ledger, trap hash, rpc endpoint, etc.) to camelBack.
src/xrpld/app/misc/detail/ValidatorSite.cpp Update lock member names to camelBack throughout implementation.
src/xrpld/app/misc/detail/WorkSSL.cpp Update SSL verify config field usage to camelBack.
src/xrpld/app/misc/FeeVoteImpl.cpp Update fee target field names to camelBack and reflow long call.
src/xrpld/app/misc/SHAMapStoreImp.cpp Update config field names and SavedStateDB member name to camelBack.
src/xrpld/app/misc/SHAMapStoreImp.h Rename SavedStateDB member to stateDb_ and update accessors.
src/xrpld/app/misc/ValidatorSite.h Rename mutex members to camelBack.
src/xrpld/consensus/Consensus.cpp Update consensus parms member accesses to camelBack.
src/xrpld/consensus/Consensus.h Update consensus parms member accesses to camelBack.
src/xrpld/consensus/ConsensusParms.h Rename ConsensusParms public constants to camelBack.
src/xrpld/consensus/DisputedTx.h Update consensus parms member accesses to camelBack.
src/xrpld/consensus/Validations.h Rename validation parms to camelBack and update logic uses.
src/xrpld/overlay/Message.h Rename once_flag_ member to camelBack.
src/xrpld/overlay/Slot.h Update config field access to camelBack.
src/xrpld/overlay/detail/ConnectAttempt.cpp Update overlay handshake feature config accesses to camelBack.
src/xrpld/overlay/detail/Handshake.cpp Update server domain and feature config accesses to camelBack.
src/xrpld/overlay/detail/Message.cpp Update std::call_once to renamed flag member.
src/xrpld/overlay/detail/OverlayImpl.cpp Rename io_context/id/timer fields and update config accesses.
src/xrpld/overlay/detail/OverlayImpl.h Rename io_context/id/timer fields to camelBack.
src/xrpld/overlay/detail/PeerImp.cpp Update many config accesses to camelBack and reformat logs.
src/xrpld/overlay/detail/PeerImp.h Update feature config accesses and reformat log line.
src/xrpld/overlay/detail/ProtocolMessage.h Rename message header fields to camelBack and update parsing/invocation.
src/xrpld/overlay/detail/TxMetrics.cpp Rename counter member usage to n.
src/xrpld/overlay/detail/TxMetrics.h Rename counter member N to n.
src/xrpld/peerfinder/detail/Counts.h Rename counters/max fields to camelBack and update accounting logic.
src/xrpld/peerfinder/detail/PeerfinderConfig.cpp Update config field access to camelBack.
src/xrpld/peerfinder/detail/SlotImp.cpp Rename endpoint/listening port members to camelBack.
src/xrpld/peerfinder/detail/SlotImp.h Rename endpoint/listening port members to camelBack and update accessors.
src/xrpld/rpc/detail/AssetCache.h Rename AccountKey cached hash field to camelBack.
src/xrpld/rpc/detail/Pathfinder.cpp Rename convert-all flag member to camelBack and update logic.
src/xrpld/rpc/detail/Pathfinder.h Rename convert-all flag member to camelBack.
src/xrpld/rpc/detail/PathRequest.cpp Rename convert-all flag and reply timepoints to camelBack; update config accesses.
src/xrpld/rpc/detail/PathRequest.h Rename convert-all flag and reply timepoints to camelBack.
src/xrpld/rpc/detail/RPCCall.cpp Update client config/port admin field access to camelBack.
src/xrpld/rpc/detail/RPCHandler.cpp Update betaRpcApi config access.
src/xrpld/rpc/detail/RPCSub.cpp Rename io_context member to camelBack and update call.
src/xrpld/rpc/detail/Role.cpp Update Port admin/secure gateway and admin credential member accesses.
src/xrpld/rpc/detail/ServerHandler.cpp Rename insight counters/events to camelBack; update betaRpcApi and port fields.
src/xrpld/rpc/detail/TransactionSign.cpp Update path search/beta RPC/fees config accesses to camelBack.
src/xrpld/rpc/detail/WSInfoSub.h Update port secure gateway net member accesses.
src/xrpld/rpc/handlers/orderbook/PathFind.cpp Update path search config access to camelBack.
src/xrpld/rpc/handlers/orderbook/RipplePathFind.cpp Update path search config access to camelBack.
src/xrpld/rpc/handlers/server_info/Version.h Update betaRpcApi config access.
src/xrpld/rpc/json_body.h Rename writer buffer member to camelBack and update access.
src/xrpld/rpc/ServerHandler.h Rename admin credentials and insight metrics members to camelBack.

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

Comment on lines 30 to +45
boost::asio::ip::address ip;
std::uint16_t port = 0;
std::set<std::string, boost::beast::iless> protocol;
std::vector<boost::asio::ip::network_v4> admin_nets_v4;
std::vector<boost::asio::ip::network_v6> admin_nets_v6;
std::vector<boost::asio::ip::network_v4> secure_gateway_nets_v4;
std::vector<boost::asio::ip::network_v6> secure_gateway_nets_v6;
std::vector<boost::asio::ip::network_v4> adminNetsV4;
std::vector<boost::asio::ip::network_v6> adminNetsV6;
std::vector<boost::asio::ip::network_v4> secureGatewayNetsV4;
std::vector<boost::asio::ip::network_v6> secureGatewayNetsV6;
std::string user;
std::string password;
std::string admin_user;
std::string admin_password;
std::string ssl_key;
std::string ssl_cert;
std::string ssl_chain;
std::string ssl_ciphers;
boost::beast::websocket::permessage_deflate pmd_options;
std::string adminUser;
std::string adminPassword;
std::string sslKey;
std::string sslCert;
std::string sslChain;
std::string sslCiphers;
boost::beast::websocket::permessage_deflate pmdOptions;

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.

I realise that but also we don't typically care as the only possible consumer is Clio atm.

Comment thread src/xrpld/app/misc/ValidatorSite.h Outdated
Comment on lines +99 to +102
// If both mutex are to be locked at the same time, `sites_mutex_` must be
// locked before `state_mutex_` or we may deadlock.
std::mutex mutable sites_mutex_;
std::mutex mutable state_mutex_;
std::mutex mutable sitesMutex_;
std::mutex mutable stateMutex_;
Comment thread src/test/unit_test/multi_runner.h Outdated
Comment on lines +93 to +97
// A parent process will periodically increment `keep_alive_`. The child
// processes will check if `keep_alive_` is being incremented. If it is
// not incremented for a sufficiently long time, the child will assume
// the parent process has died.
std::atomic<std::size_t> keep_alive{0};
std::atomic<std::size_t> keepAlive{0};
Comment thread include/xrpl/server/Handoff.h
Comment thread include/xrpl/protocol/ErrorCodes.h
@godexsoft godexsoft removed the DraftRunCI Normally CI does not run on draft PRs. This opts in. label May 19, 2026
@godexsoft
godexsoft marked this pull request as ready for review May 19, 2026 12:48

@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.

  1. This is probably style
  2. Could you make similar changes in Clio

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 160 out of 160 changed files in this pull request and generated no new comments.

@godexsoft godexsoft changed the title chore: More clang-tidy identifier renaming style: More clang-tidy identifier renaming May 19, 2026
@godexsoft godexsoft added Trivial Simple change with minimal effect, or already tested. Only needs one approval. Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. labels May 19, 2026
@bthomee
bthomee added this pull request to the merge queue May 20, 2026
Merged via the queue into XRPLF:develop with commit a830ab1 May 20, 2026
2 of 3 checks passed
@bthomee bthomee added this to the 3.2.0 milestone May 27, 2026
Kassaking7 pushed a commit to Kassaking7/rippled that referenced this pull request Jun 2, 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