-
Notifications
You must be signed in to change notification settings - Fork 137
Additional shfmt options #1168
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
Merged
Merged
Additional shfmt options #1168
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This may preempt further questions similar to bash-lsp#1161.
This wasn't included initially as it has been deprecated: mvdan/sh#658 However, it has been mentioned in bash-lsp#1165 and is a valid option in the current version of `shfmt`, so support has been added (with a suitable deprecation warning).
This wasn't included initially as it does more than just format code. However, its absence has been noted in a comment on the last PR: bash-lsp#1136 (comment) and it is a valid `shfmt` option, so support has been added. There's a similar option (`-mn` or `--minify`), but this will not be implemented as its output is not intended for human consumption and it will essentially ignore all other options presented anyway.
This will aid in language dialect detection.
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 81.27%. Comparing base (
522a5d6
) to head (773a61c
).
Report is 2 commits behind head on main.
❗ Current head 773a61c differs from pull request most recent head 3a5ac07
Please upload reports for the commit 3a5ac07 to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@ ## main #1168 +/- ## ========================================== + Coverage 81.21% 81.27% +0.05% ========================================== Files 29 29 Lines 1411 1415 +4 Branches 335 338 +3 ========================================== + Hits 1146 1150 +4 Misses 218 218 Partials 47 47
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
skovhus
skovhus
approved these changes
Jun 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
shfmt
formatting options:--keep-padding
(with a suitable deprecation notice, mentioned in fix!: options in .editorconfig not work with shfmt #1165 )--simplify
(mentioned in Support format using shfmt (fixes #320) #1136 (comment) )--filename
toshfmt
when available (to aid in language dialect detection)There will likely be a subsequent PR to add support for
.editorconfig
once this is merged.