Sponsored Content
Skip to content

chore: Enable clang-tidy bugprone-unused-local-non-trivial-variable check - #6458

Merged
bthomee merged 5 commits into
XRPLF:developfrom
godexsoft:chore/clang-tidy-checks-unused-local-non-trivial-variable
Mar 9, 2026
Merged

chore: Enable clang-tidy bugprone-unused-local-non-trivial-variable check#6458
bthomee merged 5 commits into
XRPLF:developfrom
godexsoft:chore/clang-tidy-checks-unused-local-non-trivial-variable

Conversation

@godexsoft

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR enables clang-tidy bugprone-unused-local-non-trivial-variable check.

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

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

codecov Bot commented Mar 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.8%. Comparing base (9e0d350) to head (7697282).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6458     +/-   ##
=========================================
- Coverage     79.8%   79.8%   -0.0%     
=========================================
  Files          861     861             
  Lines        67858   67857      -1     
  Branches      7551    7552      +1     
=========================================
- Hits         54178   54176      -2     
- Misses       13680   13681      +1     
Files with missing lines Coverage Δ
src/xrpld/app/consensus/RCLConsensus.cpp 59.2% <ø> (-0.1%) ⬇️

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

@godexsoft godexsoft removed the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Mar 3, 2026
@godexsoft
godexsoft marked this pull request as ready for review March 3, 2026 17:46
Comment thread src/test/rpc/LedgerEntry_test.cpp

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

Enables the clang-tidy bugprone-unused-local-non-trivial-variable check and updates a few code/test sites to comply by removing unused non-trivial locals and avoiding repeated temporary creation.

Changes:

  • Enable bugprone-unused-local-non-trivial-variable in .clang-tidy.
  • Remove unused local variables (e.g., std::stringstream, std::string) flagged by the new check.
  • Minor test cleanup to avoid repeating asString() calls.

Reviewed changes

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

Show a summary per file
File Description
src/xrpld/app/consensus/RCLConsensus.cpp Removes an unused std::stringstream local.
src/test/rpc/Peers_test.cpp Avoids repeated asString() call by storing tag in a local.
src/test/rpc/LedgerEntry_test.cpp Removes unused locals and simplifies a test block scope.
src/test/app/Manifest_test.cpp Removes an unused std::string local.
.clang-tidy Enables bugprone-unused-local-non-trivial-variable.

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

Comment thread src/test/rpc/Peers_test.cpp
@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. Trivial Simple change with minimal effect, or already tested. Only needs one approval. labels Mar 9, 2026
@godexsoft
godexsoft requested a review from bthomee March 9, 2026 13:21
@bthomee
bthomee enabled auto-merge (squash) March 9, 2026 15:08
@bthomee
bthomee merged commit 6b301ef into XRPLF:develop Mar 9, 2026
1 check 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
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