-
Notifications
You must be signed in to change notification settings - Fork 1.2k
tests/k8s: delint confidential_kbs.sh #11294
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
tests/k8s: delint confidential_kbs.sh #11294
Conversation
The shellcheck action has caught some extra warnings that running locally didn't. I will address these too:
|
Addressed the following shellcheck advices: SC2046 (warning): Quote this to prevent word splitting. SC2248 (style): Prefer double quoting even when variables don't contain special characters SC2250 (style): Prefer putting braces around variable references even when not strictly required. SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Although the script will inherit that setting from the caller scripts, expliciting it in the file will vanish shellcheck "warning: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails. [SC2164]" Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Fixed "warning: HKD_PATH is referenced but not assigned. [SC2154]" Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2660376
to
c9fb0b9
Compare
Added two commits to address #11294 (comment) although I am not able to have shellcheck to emit that warnings neither in VSCode nor running shellcheck (version 0.10.0, fedora packaged) |
Fixed "note: Not following: ./../../../tools/packaging/guest-image/lib_se.sh: openBinaryFile: does not exist (No such file or directory) [SC1091]" Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
one more commit and it's free of shellcheck complains \o/ |
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.
LGTM. Thanks @wainersm!
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 to me, thanks @wainersm ❤️
Addressed the following shellcheck advices:
SC2046 (warning): Quote this to prevent word splitting.
SC2248 (style): Prefer double quoting even when variables don't contain special characters
SC2250 (style): Prefer putting braces around variable references even when not strictly required.
SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh
Resulting in a free of warning/info/style file.
I have fixed some stuffs on that file recently and seeing the shellcheck advices was making me sick, hence this PR that I hope doesn't introduce unintentional bugs (always are a risk).