-
Notifications
You must be signed in to change notification settings - Fork 226
Lint all scripts with shellcheck #392
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
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.
Nice one @RedbackThomson. I wasn't aware of shellcheck
until today. Nice little tool!
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.
Looks good! Just a some minor nits and a couple of questions for my own edification
fi | ||
|
||
helm_output_dir="$SERVICE_CONTROLLER_SOURCE_PATH/helm" | ||
ag_args="$SERVICE $RELEASE_VERSION -o $SERVICE_CONTROLLER_SOURCE_PATH --template-dirs $TEMPLATES_DIR --aws-sdk-go-version $AWS_SDK_GO_VERSION" |
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.
Funny, my shellcheck
didn't make this suggestion (replacing this string with an array). Curious what command line you used?
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.
It was actually L211 where it complained about this. Because we are trying to expand a string to use as CLI args, it suggested we use an array of strings rather.
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.
⭐⭐⭐⭐⭐
/approve
Leaving the lgtm-ing to @jljaco |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Hilaly, jaypipes, jljaco, RedbackThomson The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description of changes:
Used the output of the
shellcheck
tool to make style changes to all of the shell scripts within the repository. Added a newmake
target forlint-shell
which lints all of the scripts and excludes SC1091, which fails because wesource
other scripts using path variables (a known limitation ofshellcheck
).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.