fix: Update clang-tidy to include src/tests directory header check - #7307
Conversation
726e432 to
b404dae
Compare
|
Please, update the PR title, these are the choices: https://github.com/XRPLF/actions/blob/main/.github/workflows/check-pr-title.yml#L24 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7307 +/- ##
=========================================
- Coverage 82.4% 82.3% -0.0%
=========================================
Files 1011 1011
Lines 76330 76330
Branches 7318 7316 -2
=========================================
- Hits 62874 62850 -24
- Misses 13456 13480 +24 🚀 New features to boost your workflow:
|
clang-tidy to include src/tests directory header checkclang-tidy to include src/tests directory header check
a5ab8fe to
8ed3708
Compare
clang-tidy to include src/tests directory header checkclang-tidy to include src/tests directory header check
8ed3708 to
1525e2a
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s clang-tidy configuration so that headers under src/tests are included in the header-filtered checks, and then applies style/clang-tidy-driven cleanups to the affected test helper code to keep the build and checks passing.
Changes:
- Expand
.clang-tidyHeaderFilterRegexto includetests(in addition totest) directories. - Apply clang-tidy/style fixes in
src/tests/libxrpl(designated initializers, nested namespace syntax, naming alignment likeAccount::kMaster, and adding[[nodiscard]]on getters/overrides). - Add a local suppression for the intentionally-uppercase
XRPhelper function name.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/libxrpl/tx/AccountSet.cpp | Uses designated initializers for test case data to satisfy readability/style checks. |
| src/tests/libxrpl/helpers/TxTest.h | Adds a targeted NOLINT for the XRP helper name under clang-tidy naming rules. |
| src/tests/libxrpl/helpers/TxTest.cpp | Updates genesis/master account usage to the renamed Account::kMaster. |
| src/tests/libxrpl/helpers/TestServiceRegistry.h | Applies style updates (nested namespace, member naming) aligned with clang-tidy. |
| src/tests/libxrpl/helpers/TestFamily.h | Minor style adjustments (nested namespace, [[nodiscard]], pointer usage in reset()). |
| src/tests/libxrpl/helpers/IOU.h | Formatting/style tweaks in constructor initializer list. |
| src/tests/libxrpl/helpers/Account.h | Renames master to kMaster and adds [[nodiscard]] to accessors. |
| src/tests/libxrpl/helpers/Account.cpp | Renames the static definition to Account::kMaster. |
| .clang-tidy | Updates header filter regex to include headers under tests directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| IOU(Currency currency, Account const& issuer) : currency_(currency), issuer_(issuer.id()) | ||
| { |
High Level Overview of Change
Update configuration of the
clang-tidytool to include headers from thesrc/testsand apply the project style to affected files.Context of Change
The goal is to improve automated checks for the project.
API Impact
No API changes