-
Notifications
You must be signed in to change notification settings - Fork 942
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
shfmt files #351
shfmt files #351
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the cleanup of the code! It seems to be all spacing fixes and cleanup of some formatting. The only thing is just the de-quoting of some of the vars... I understand that you should quote the vars to prevent parameter expansion issues, but it's not complaining about some of them being unquoted...
See https://github.com/github/super-linter/pull/351#discussion_r448993344 |
P.S. I use https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format and install shfmt from https://github.com/mvdan/sh either natively on linux or using https://scoop.sh/ on windows. I would use chocolatey but there is no package for shfmt in the chocolatey repositories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dope
I ran:
(does not recurse through subfolders, so the intentionally bad shell files for test purposes are untouched)
This is just a code formatter. It can be used as a linter as well (I've mentioned it in some issue discussion). Most of the changes are whitespace changes. Generally all of the changes are meant to improve readability and ensure the shell (bash) does not incorrectly interpret anything.
If there are any specific questions feel free to comment inline.
I won't be too hurt if this doesn't merge. It took seconds to create this branch, and a valid reason for NOT merging it would be that this style of formatting would not be enforced in the future (unless it were to be mandated via pre-commit hooks or GHA checks). But it can still carry value as a one-off.