Sponsored Content
Skip to content

style: Use shfmt instead of bashate - #7326

Merged
bthomee merged 4 commits into
XRPLF:developfrom
mathbunnyru:use_shfmt
May 26, 2026
Merged

style: Use shfmt instead of bashate#7326
bthomee merged 4 commits into
XRPLF:developfrom
mathbunnyru:use_shfmt

Conversation

@mathbunnyru

Copy link
Copy Markdown
Contributor

High Level Overview of Change

https://github.com/openstack/bashate was last released on Oct 6, 2022
And what's most important, it's not auto-formatting, and the code ends up somewhat similar, but still not uniform.

https://github.com/mvdan/sh#shfmt is a much more modern alternative.
Let's use it.

Note: the second commit is a fully automatic change.

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 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 May 26, 2026
@mathbunnyru
mathbunnyru requested a review from bthomee May 26, 2026 15:05
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.4%. Comparing base (633ef47) to head (c3e39ee).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #7326     +/-   ##
=========================================
- Coverage     82.4%   82.4%   -0.0%     
=========================================
  Files         1011    1011             
  Lines        76382   76382             
  Branches      7315    7315             
=========================================
- Hits         62914   62902     -12     
- Misses       13468   13480     +12     

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

@bthomee
bthomee added this pull request to the merge queue May 26, 2026

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

This PR updates the repository’s formatting/linting tooling by switching shell-script checks from bashate to shfmt, and applies automated formatting changes across various shell scripts to match the new formatter’s output.

Changes:

  • Replace bashate pre-commit hook with shfmt (and add shfmt to cspell dictionary).
  • Reformat multiple shell scripts to shfmt style (indentation, spacing, redirections, etc.).
  • Also bump several other pre-commit tool revisions (clang-format, gersemi, prettier, black, cspell).

Reviewed changes

Copilot reviewed 3 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package/shared/update-xrpld Minor formatting adjustments consistent with shfmt.
package/build_pkg.sh Reformats CLI parsing and staging logic to shfmt style.
cspell.config.yaml Adds shfmt to allowed words.
bin/git/update-version.sh Reformats script; still contains some unquoted-variable robustness issues.
bin/git/squash-branches.sh Reformats script; still contains some unquoted-variable/echo robustness issues.
bin/git/setup-upstreams.sh Reformats script (minor whitespace/redirect changes).
.pre-commit-config.yaml Switches from bashate to shfmt and updates multiple other tool pins.
.github/scripts/rename/namespace.sh Minor redirect formatting (&>/dev/null).
.github/scripts/rename/docs.sh Minor redirect formatting (&>/dev/null).
.github/scripts/rename/definitions.sh Minor redirect formatting (&>/dev/null).
.github/scripts/rename/copyright.sh Minor formatting; still uses unsafe echo -e prepend pattern that can corrupt files.
.github/scripts/rename/config.sh Minor redirect formatting (&>/dev/null).
.github/scripts/rename/cmake.sh Minor redirect formatting and whitespace adjustments.
.github/scripts/rename/binary.sh Minor redirect formatting (&>/dev/null).

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

Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml
Comment thread .github/scripts/rename/copyright.sh
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 26, 2026
@bthomee
bthomee enabled auto-merge May 26, 2026 18:07
@bthomee
bthomee added this pull request to the merge queue May 26, 2026
Merged via the queue into XRPLF:develop with commit 23d0812 May 26, 2026
3 checks passed
@bthomee bthomee added this to the 3.2.0 milestone May 27, 2026
Kassaking7 pushed a commit to Kassaking7/rippled that referenced this pull request Jun 2, 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.

3 participants