Skip to content

chore: Remove unnecessary clang-format off/on directives#6682

Open
bthomee wants to merge 1 commit intodevelopfrom
bthomee/clang-format
Open

chore: Remove unnecessary clang-format off/on directives#6682
bthomee wants to merge 1 commit intodevelopfrom
bthomee/clang-format

Conversation

@bthomee
Copy link
Copy Markdown
Collaborator

@bthomee bthomee commented Mar 27, 2026

High Level Overview of Change

This change removes unnecessary // clang-format off and // clang-format on directives that surround blocks of code.

Context of Change

The clang-format off/on directives can help with formatting code in specific ways, e.g. to force vertical alignment of values across multiple lines. Certain comments implicitly suggested that the last time one looked at these statements was when Clang 10 still existed. It was therefore time to take another look.

For this PR:

  • All clang-format off/on directives were removed.
  • The pre-commit hook was run.
  • The resulting diff was inspected.
  • Most changes that became totally mangled were restored to their previous glory, with the clang-format directives reinstated.
  • Some changes were manually adjusted so that the directives were no longer necessary, while the formatting looked as good as, or better than, it was before.
  • Some changes looked the same or similar enough after removing the directives, so in these cases the directives were also left off.
  • Some manual tweaks to spacing were made to align mis-aligned values.

Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V12

@bthomee bthomee requested a review from godexsoft March 27, 2026 20:50
@bthomee bthomee added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Mar 27, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.4%. Comparing base (3d9c545) to head (4e99541).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6682     +/-   ##
=========================================
- Coverage     81.5%   81.4%   -0.0%     
=========================================
  Files          999     999             
  Lines        74456   74456             
  Branches      7559    7559             
=========================================
- Hits         60651   60643      -8     
- Misses       13805   13813      +8     
Files with missing lines Coverage Δ
include/xrpl/basics/IntrusivePointer.ipp 86.6% <ø> (ø)
include/xrpl/basics/SlabAllocator.h 93.3% <ø> (ø)
include/xrpl/protocol/detail/STVar.h 100.0% <ø> (ø)
include/xrpl/tx/paths/detail/Steps.h 94.6% <ø> (ø)
include/xrpl/tx/transactors/dex/AMMHelpers.h 96.0% <ø> (ø)
src/libxrpl/protocol/STValidation.cpp 81.8% <ø> (ø)
src/libxrpl/tx/applySteps.cpp 79.1% <100.0%> (ø)
src/libxrpl/tx/paths/AMMLiquidity.cpp 84.7% <ø> (ø)
src/libxrpl/tx/transactors/check/CheckCash.cpp 92.6% <100.0%> (ø)
src/libxrpl/tx/transactors/escrow/EscrowHelpers.h 98.7% <100.0%> (ø)
... and 2 more

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant