Sponsored Content
Skip to content

chore: Update pre-commit hooks - #6460

Merged
bthomee merged 3 commits into
XRPLF:developfrom
mathbunnyru:up_pre_commit2
Mar 3, 2026
Merged

chore: Update pre-commit hooks#6460
bthomee merged 3 commits into
XRPLF:developfrom
mathbunnyru:up_pre_commit2

Conversation

@mathbunnyru

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Updating pre-commit hooks to latest (and greatest) version.

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)

Copilot AI review requested due to automatic review settings March 3, 2026 16:06
@mathbunnyru mathbunnyru added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Mar 3, 2026
@mathbunnyru
mathbunnyru requested a review from bthomee March 3, 2026 16:07

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

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 if init-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., why sfGracePeriod is 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 local using alias / constexpr bool helper 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.

@mathbunnyru mathbunnyru 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 Mar 3, 2026
@bthomee
bthomee enabled auto-merge (squash) March 3, 2026 17:23
@bthomee
bthomee merged commit fcec31e into XRPLF:develop Mar 3, 2026
1 check passed
@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 (0abd762) to head (70b48ea).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           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     
Files with missing lines Coverage Δ
include/xrpl/ledger/detail/RawStateTable.h 100.0% <100.0%> (ø)
src/libxrpl/ledger/OpenView.cpp 95.1% <100.0%> (ø)
src/libxrpl/protocol/STVar.cpp 97.3% <ø> (ø)
src/libxrpl/tx/transactors/AMM/AMMUtils.cpp 95.5% <100.0%> (+<0.1%) ⬆️
src/libxrpl/tx/transactors/AMM/AMMVote.cpp 96.5% <100.0%> (+<0.1%) ⬆️
src/libxrpl/tx/transactors/Lending/LoanSet.cpp 91.3% <100.0%> (+<0.1%) ⬆️

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

@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