Correct shell scripts issues, format shell scripts#486
Merged
IgorTodorovskiIBM merged 10 commits intomainfrom Oct 8, 2023
Merged
Correct shell scripts issues, format shell scripts#486IgorTodorovskiIBM merged 10 commits intomainfrom
IgorTodorovskiIBM merged 10 commits intomainfrom
Conversation
Member
Author
|
Exploring the options for shellcheck. I had passed -o all initially which triggered it to also change all information/warning cases. I'm using this currently: |
MikeFultonDev
approved these changes
Oct 7, 2023
Collaborator
MikeFultonDev
left a comment
There was a problem hiding this comment.
changes seem reasonable.
maybe this would be a good thing to put a test or two into metaport first to validate nothing breaks?
bin/zopen-help2man
Outdated
| if $("${tool}" --help >/dev/null 2>&1); then | ||
| # Tool has implemented --help | ||
| if $( "${tool}" --version >/dev/null 2>&1 ) ; then | ||
| if $("${tool}" --version >/dev/null 2>&1); then |
Collaborator
There was a problem hiding this comment.
i kinda like a space here - but if others don't, i'm ok to change... e.g. i prefer $( <cmd> ) rather than $(<cmd>)
This reverts commit 0dc2d71.
Collaborator
MikeFultonDev
left a comment
There was a problem hiding this comment.
Does -z test for both unset and equal to ‘’ like the old code ?
Member
Author
Yep: |
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
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.
Also introduces the script
tools/format_and_check_scripts.shwhich depends on shfmt (go tool) and shellcheck (only available on non-z/OS since its written in haskell)Related to #482