Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shfmt config to disable Bash code simplification #411

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

thirtyseven
Copy link
Contributor

@thirtyseven thirtyseven commented Oct 31, 2024

I'm @ormandi's colleague and was following #409. It seems the formatter wanting to remove quotes is due to Trunk by default using the -s flag for shfmt to simplify code. Either there is a bug in shfmt that makes it overly aggressive in removing quotes or what it's doing is actually correct, but I'm not enough of a shell expert to tell.

This PR sidesteps the issue by customizes the Trunk config to avoid passing -s.

@ormandi
Copy link
Contributor

ormandi commented Oct 31, 2024

Thanks @thirtyseven! This is great!

@fmeum fmeum enabled auto-merge (squash) October 31, 2024 23:03
@fmeum fmeum merged commit 1574832 into bazel-contrib:master Oct 31, 2024
35 checks passed
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.

3 participants