Sponsored Content
Skip to content

style: Add bashate pre-commit hook to unify bash style - #6994

Merged
bthomee merged 1 commit into
XRPLF:developfrom
mathbunnyru:add_bashate
Apr 22, 2026
Merged

style: Add bashate pre-commit hook to unify bash style#6994
bthomee merged 1 commit into
XRPLF:developfrom
mathbunnyru:add_bashate

Conversation

@mathbunnyru

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This adds bashate to unify how we write bash files.

Context of Change

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)

@mathbunnyru
mathbunnyru requested review from bthomee and Copilot April 22, 2026 13:44
@mathbunnyru mathbunnyru 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 Apr 22, 2026
Comment thread .github/scripts/rename/docs.sh

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

Adds bashate to the repo’s pre-commit configuration to enforce consistent Bash formatting, and updates existing shell scripts to conform to the enforced style.

Changes:

  • Add bashate as a pre-commit hook (with E006 ignored).
  • Reformat multiple .sh scripts to satisfy bashate’s style expectations (indentation / if ...; then / loop formatting).
  • Minor whitespace alignment in Conan lockfile regeneration script.

Reviewed changes

Copilot reviewed 1 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.pre-commit-config.yaml Adds bashate hook to enforce consistent Bash style.
conan/lockfile/regenerate.sh Aligns line continuations/indentation for conan lock create commands.
bin/git/update-version.sh Reformat if block and command indentation for bashate compliance.
bin/git/squash-branches.sh Reformat if/for blocks and indentation for bashate compliance.
bin/git/setup-upstreams.sh Reformat conditional blocks/indentation for bashate compliance.
.github/scripts/rename/namespace.sh Re-indent conditionals/loops for bashate compliance.
.github/scripts/rename/include.sh Re-indent if body for bashate compliance.
.github/scripts/rename/docs.sh Re-indent macOS gsed check for bashate compliance.
.github/scripts/rename/definitions.sh Re-indent macOS gsed check for bashate compliance.
.github/scripts/rename/copyright.sh Re-indent macOS gsed check and loop bodies for bashate compliance.
.github/scripts/rename/config.sh Re-indent macOS gsed check and loop bodies for bashate compliance.
.github/scripts/rename/cmake.sh Re-indent macOS gsed/ghead checks and conditional bodies for bashate compliance.
.github/scripts/rename/binary.sh Re-indent macOS gsed check for bashate compliance.

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

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

:rage1:

@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.5%. Comparing base (7c7c189) to head (b6661e0).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6994     +/-   ##
=========================================
- Coverage     82.5%   82.5%   -0.0%     
=========================================
  Files         1010    1010             
  Lines        79246   79245      -1     
  Branches      7529    7528      -1     
=========================================
- Hits         65389   65386      -3     
- Misses       13857   13859      +2     

see 1 file 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.

@bthomee
bthomee added this pull request to the merge queue Apr 22, 2026
Merged via the queue into XRPLF:develop with commit 3429845 Apr 22, 2026
3 checks passed
marek-foss-neti pushed a commit to marek-foss-neti/rippled that referenced this pull request May 5, 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