Sponsored Content
Skip to content

style: Run shfmt on workflows, actions and markdown bash code - #7333

Merged
bthomee merged 11 commits into
XRPLF:developfrom
mathbunnyru:apply_shfmt_workflows
May 27, 2026
Merged

style: Run shfmt on workflows, actions and markdown bash code#7333
bthomee merged 11 commits into
XRPLF:developfrom
mathbunnyru:apply_shfmt_workflows

Conversation

@mathbunnyru

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This extracts inline bash in mentioned files, formats it and puts it back.
More code gets formatted uniformely.

I suggest not spending too much time on the script - it's AI-coded, and seems to work.
There is not much purpose of making it nice.

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 a review from bthomee May 27, 2026 13:42
@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 27, 2026
@bthomee
bthomee requested a review from Copilot May 27, 2026 13:43

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 adds tooling to format embedded bash snippets consistently with the repository’s shfmt pre-commit configuration, then applies the resulting formatting to workflows, actions, and markdown examples.

Changes:

  • Adds .github/scripts/format-inline-bash.py and two local pre-commit hooks for workflow/action run: blocks and markdown bash fences.
  • Applies shfmt-style indentation and redirection spacing to GitHub workflow/action shell snippets.
  • Updates markdown bash examples and retags one non-shell error block as text.

Reviewed changes

Copilot reviewed 5 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/scripts/format-inline-bash.py New formatter for embedded workflow/action and markdown shell snippets.
.pre-commit-config.yaml Registers local hooks for inline bash formatting.
.github/actions/build-deps/action.yml Applies shell formatting to Conan install command.
.github/actions/generate-version/action.yml Applies shell formatting to version generation steps.
.github/workflows/build-nix-image.yml Applies shell formatting to manifest loop.
.github/workflows/check-pr-description.yml Formats inline and multiline PR-description check commands.
.github/workflows/on-pr.yml Applies shell formatting to output and gh api commands.
.github/workflows/reusable-build-docker-image.yml Applies shell formatting to Docker metadata output.
.github/workflows/reusable-build-test-config.yml Applies shell formatting throughout build/test workflow steps.
.github/workflows/reusable-check-levelization.yml Applies shell indentation formatting.
.github/workflows/reusable-check-rename.yml Applies shell indentation formatting.
.github/workflows/reusable-clang-tidy.yml Applies shell formatting to clang-tidy workflow steps.
.github/workflows/reusable-package.yml Applies shell formatting to package matrix generation.
.github/workflows/reusable-strategy-matrix.yml Applies shell formatting to matrix output redirection.
BUILD.md Formats bash snippet and retags non-shell error output as text.
include/xrpl/protocol_autogen/README.md Formats bash command comments.
package/README.md Formats bash examples for package builds.
cspell.config.yaml Adds dedented to accepted words for the new script docstring.

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

Comment thread .github/scripts/format-inline-bash.py
Comment thread .github/scripts/format-inline-bash.py
Comment thread .github/scripts/format-inline-bash.py
Comment thread .github/scripts/format-inline-bash.py
@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.4%. Comparing base (1438bf1) to head (039677d).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #7333   +/-   ##
=======================================
  Coverage     82.4%   82.4%           
=======================================
  Files         1011    1011           
  Lines        76477   76477           
  Branches      7319    7315    -4     
=======================================
+ Hits         62990   62999    +9     
+ Misses       13487   13478    -9     

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

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

Copilot reviewed 5 out of 18 changed files in this pull request and generated 1 comment.

Comment thread .github/scripts/format-inline-bash.py
@bthomee
bthomee enabled auto-merge May 27, 2026 17:26
@bthomee
bthomee added this pull request to the merge queue May 27, 2026
Merged via the queue into XRPLF:develop with commit f9551ac May 27, 2026
3 checks passed
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