Skip to content

KNOX-2629 - Fix new shellcheck errors#465

Merged
smolnar82 merged 3 commits intoapache:masterfrom
zeroflag:KNOX-2629-shellcheck
Jul 13, 2021
Merged

KNOX-2629 - Fix new shellcheck errors#465
smolnar82 merged 3 commits intoapache:masterfrom
zeroflag:KNOX-2629-shellcheck

Conversation

@zeroflag
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

With shellcheck v0.7.2 there are some new errors coming when running the build with -Dshellcheck=true.

Most of these aren't real issues. In one case I disabled the warning (SC2153 - possible misspelling), in other cases I had to specify the path of a referenced shell script.

How was this patch tested?

By running the full build with -Dshellcheck=true.

@zeroflag zeroflag closed this Jul 12, 2021
@zeroflag zeroflag reopened this Jul 12, 2021
@zeroflag zeroflag changed the title KNOX-2629 Fix new shellcheck errors (amagyar) KNOX-2629 - Fix new shellcheck errors (amagyar) Jul 12, 2021
@zeroflag zeroflag closed this Jul 12, 2021
@zeroflag zeroflag reopened this Jul 12, 2021
@smolnar82 smolnar82 self-requested a review July 12, 2021 18:54
@smolnar82 smolnar82 changed the title KNOX-2629 - Fix new shellcheck errors (amagyar) KNOX-2629 - Fix new shellcheck errors Jul 12, 2021
Copy link
Copy Markdown
Contributor

@smolnar82 smolnar82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks, @zeroflag !

@smolnar82
Copy link
Copy Markdown
Contributor

Thanks, @zeroflag for your contribution. It's a small but very important change!

@smolnar82 smolnar82 merged commit 875da32 into apache:master Jul 13, 2021
@smolnar82
Copy link
Copy Markdown
Contributor

I tried it locally (intentionally made a mistake in knox-functions.sh) and it worked like a charm:

[WARNING] No shellcheck download url provided for current os.name-os.arch [Mac_OS_X-x86_64]
[INFO] shellcheck release will be fetched at [https://github.com/koalaman/shellcheck/releases/download/v0.7.2/shellcheck-v0.7.2.darwin.x86_64.tar.xz]
[WARNING] No signatures were supplied, skipping file validation
[INFO] Got from cache: /Users/sandormolnar/.m2/repository/.cache/download-maven-plugin/shellcheck-v0.7.2.darwin.x86_64.tar.xz_039c1f418e8c8ff4a7ca3beddcbfc3dc
[INFO] Expanding: /Users/sandormolnar/projects/knox/gateway-release-common/target/shellcheck-plugin/shellcheck-v0.7.2.darwin.x86_64.tar.xz into /Users/sandormolnar/projects/knox/gateway-release-common/target/shellcheck-plugin
[WARNING] 
[WARNING] In /Users/sandormolnar/projects/knox/gateway-release-common/home/bin/knox-functions.sh line 57:
[WARNING]   if [ "$JAVA" != "" ]; then;
[WARNING]                             ^-- SC1051: Semicolons directly after 'then' are not allowed. Just remove it.
[WARNING] 
[WARNING] For more information:
[WARNING]   https://www.shellcheck.net/wiki/SC1051 -- Semicolons directly after 'then' ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants