Skip to content

chore: add .shfmt configuration and format shell scripts#403

Merged
dmihalcik-virtru merged 7 commits intoopentdf:mainfrom
dmihalcik-virtru:chore/add-shfmt
Feb 17, 2026
Merged

chore: add .shfmt configuration and format shell scripts#403
dmihalcik-virtru merged 7 commits intoopentdf:mainfrom
dmihalcik-virtru:chore/add-shfmt

Conversation

@dmihalcik-virtru
Copy link
Member

@dmihalcik-virtru dmihalcik-virtru commented Feb 13, 2026

Summary

  • Add .shfmt configuration file (bash dialect, 2-space indent, space redirects, switch case indent)
  • Apply shfmt -w . formatting to all existing shell scripts
  • No functional changes - formatting only

Test plan

  • shfmt -d . returns clean
  • shellcheck still passes on all scripts
  • CI check workflow passes

🤖 Generated with Claude Code

Part of stacked PR series decomposing chore/the-claudiest-day-tmux

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>
@dmihalcik-virtru dmihalcik-virtru requested review from a team as code owners February 13, 2026 01:54
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 shfmt for shell script formatting. A dedicated configuration file now dictates the preferred style, which has been uniformly applied across all relevant shell scripts. This effort ensures a standardized codebase without impacting any existing functionality.

Highlights

  • New .shfmt Configuration: A new .shfmt configuration file has been added to standardize shell script formatting rules, specifying bash dialect, 2-space indentation, space redirects, and switch case indentation.
  • Shell Script Formatting Applied: All existing shell scripts in the repository have been reformatted using shfmt -w . to adhere to the newly defined style guidelines.
  • No Functional Changes: These changes are purely cosmetic, focusing solely on code formatting, and introduce no functional modifications to the existing codebase.

🧠 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
  • .shfmt
    • Added new configuration file for shfmt.
  • xtest/sdk/go/cli.sh
    • Reformatted shell script for consistent indentation and spacing.
  • xtest/sdk/go/otdfctl.sh
    • Reformatted shell script for consistent indentation and spacing.
  • xtest/sdk/java/cli.sh
    • Reformatted shell script for consistent indentation and spacing.
  • xtest/sdk/js/cli.sh
    • Reformatted shell script for consistent indentation and spacing.
  • xtest/sdk/scripts/checkout-all.sh
    • Reformatted shell script for consistent indentation and spacing.
  • xtest/sdk/scripts/checkout-sdk-branch.sh
    • Reformatted shell script for consistent indentation and spacing.
  • xtest/sdk/scripts/cleanup-all.sh
    • Reformatted shell script for consistent indentation and spacing.
  • xtest/sdk/scripts/post-checkout-java.sh
    • Reformatted shell script for consistent indentation and spacing.
Activity
  • The pull request was generated using Claude Code.
  • This PR is part of a larger series of stacked pull requests, decomposing chore/the-claudiest-day-tmux.
  • A test plan is outlined to ensure shfmt -d . returns clean, shellcheck still passes on all scripts, and CI check workflows are successful.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

dmihalcik-virtru and others added 3 commits February 12, 2026 21:28
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>
elizabethhealy
elizabethhealy previously approved these changes Feb 13, 2026
@sonarqubecloud
Copy link

@dmihalcik-virtru dmihalcik-virtru merged commit 44779d7 into opentdf:main Feb 17, 2026
14 checks passed
@dmihalcik-virtru dmihalcik-virtru deleted the chore/add-shfmt branch February 17, 2026 17:37
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.

2 participants