Skip to content

ci: Add shfmt formatting check for shell scripts - #70

Merged
roottool merged 5 commits into
mainfrom
feat/add-shfmt-formatter
Jul 19, 2026
Merged

roottool merged 5 commits into
mainfrom
feat/add-shfmt-formatter

Conversation

@roottool

Copy link
Copy Markdown
Owner

Summary

  • Add a shfmt formatting check to the CI lint job, pairing it with the existing ShellCheck step so shell/zsh files follow a consistent style.
  • shfmt picks up indent settings automatically from the repo's .editorconfig (2-space indent), so no extra formatter config is needed.
  • Add shfmt to the Brewfile for local use, and reformat install-packages.sh (the one file that wasn't already compliant) so CI starts green.

Test plan

  • Ran shfmt -d locally against all files targeted by the lint job (dot_z*, *.sh, *.zsh) and confirmed a clean diff after formatting install-packages.sh.
  • Confirm the new Setup shfmt / Check formatting (shfmt) steps pass in CI.

🤖 Generated with Claude Code

roottool and others added 2 commits July 19, 2026 14:48
Pairs shfmt with the existing ShellCheck lint step so shell/zsh files
follow a consistent style enforced in CI, honoring the repo's
.editorconfig indent settings automatically.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Pairs shfmt with the existing ShellCheck lint step so shell/zsh files
follow a consistent style enforced in CI, honoring the repo's
.editorconfig indent settings automatically.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@roottool roottool self-assigned this Jul 19, 2026
@roottool
roottool enabled auto-merge (squash) July 19, 2026 06:16
Fixes shellscript_files output referencing the boolean output instead of
the file list, avoids splicing PR-controlled filenames directly into
run: scripts by passing them via env, and makes the examples/ exclusion
recursive to match the previous grep-based behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@roottool
roottool merged commit cfbd53e into main Jul 19, 2026
7 of 8 checks passed
@roottool
roottool deleted the feat/add-shfmt-formatter branch July 19, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant