chore: add .shfmt configuration and format shell scripts#403
chore: add .shfmt configuration and format shell scripts#403dmihalcik-virtru merged 7 commits intoopentdf:mainfrom
Conversation
Add shfmt configuration for consistent shell script formatting: bash dialect, 2-space indent, space redirects, switch case indent. Apply formatting to all existing shell scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: David Mihalcik <dmihalcik@virtru.com>
Summary of ChangesHello @dmihalcik-virtru, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances code consistency and maintainability by introducing and applying Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces shfmt for shell script formatting and applies it to existing scripts. A new .shfmt configuration file is added to define the formatting rules.
My main feedback is that there's an inconsistency between the .shfmt configuration and the formatting applied to the shell scripts. The configuration specifies 2-space indentation, but the files have been formatted with tabs. This should be corrected to ensure consistency and for the shfmt -d . check to pass as intended.
Add shfmt check step to the check workflow to ensure all shell scripts are formatted according to the .shfmt configuration at repository root. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace .shfmt with .editorconfig format for shell script formatting. Reformat all shell scripts with 2-space indentation and proper spacing around redirects according to the .editorconfig [*.sh] section. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove space_redirects from .editorconfig and reformat shell scripts to use compact redirect syntax (e.g., &>/dev/null instead of &> /dev/null). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|



Summary
.shfmtconfiguration file (bash dialect, 2-space indent, space redirects, switch case indent)shfmt -w .formatting to all existing shell scriptsTest plan
shfmt -d .returns cleanshellcheckstill passes on all scripts🤖 Generated with Claude Code
Part of stacked PR series decomposing
chore/the-claudiest-day-tmux