chore: Update pre-commit hooks - #6460
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repository’s pre-commit tooling (notably clang-format / prettier / black / cspell) and applies the resulting formatting deltas across a handful of C++ files.
Changes:
- Bump pinned revisions for several pre-commit hooks in
.pre-commit-config.yaml. - Reformat impacted C++ code to match the updated clang-format output (mostly
else ifinit-statements and initializer formatting). - Minor line-wrapping changes in protocol/ledger code due to formatter behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.pre-commit-config.yaml |
Updates pinned hook SHAs/versions for formatting and linting tools. |
src/libxrpl/tx/transactors/Lending/LoanSet.cpp |
clang-format-driven reflow of an else if init-statement. |
src/libxrpl/tx/transactors/AMM/AMMVote.cpp |
clang-format-driven reflow of an else if init-statement. |
src/libxrpl/tx/transactors/AMM/AMMUtils.cpp |
clang-format-driven reflow of an else if init-statement. |
src/libxrpl/protocol/STVar.cpp |
clang-format-driven reflow of a long std::is_same_v expression. |
src/libxrpl/ledger/OpenView.cpp |
clang-format-driven reflow of constructor member initialization. |
include/xrpl/ledger/detail/RawStateTable.h |
clang-format-driven reflow of constructor member initialization. |
Comments suppressed due to low confidence (2)
src/libxrpl/tx/transactors/Lending/LoanSet.cpp:88
- This initializer has an empty
//comment, which reads like a leftover placeholder and adds noise. Please remove it or replace it with a meaningful comment explaining the intent (e.g., whysfGracePeriodis fetched here).
auto const gracePeriod = tx[~sfGracePeriod]; //
src/libxrpl/protocol/STVar.cpp:138
- The clang-format reflow splits
std::onto its own line, which hurts readability and makes the type trait harder to scan. Consider introducing a localusingalias /constexpr boolhelper for the tuple type (or otherwise shortening the expression) so formatting stays readable under the new clang-format version.
else if constexpr (
std::
is_same_v<std::tuple<std::remove_cvref_t<Args>...>, std::tuple<SerialIter, SField>>)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6460 +/- ##
=======================================
Coverage 79.8% 79.8%
=======================================
Files 858 858
Lines 67761 67764 +3
Branches 7572 7553 -19
=======================================
+ Hits 54055 54076 +21
+ Misses 13706 13688 -18
🚀 New features to boost your workflow:
|
High Level Overview of Change
Updating pre-commit hooks to latest (and greatest) version.
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)