-
Notifications
You must be signed in to change notification settings - Fork 519
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
Add ShellCheck to check-lints
(for tools)
#2532
Conversation
@@ -1,4 +1,5 @@ | |||
#!/usr/bin/env bash | |||
# shellcheck disable=SC2054 # Arrays are formatted for passing args to other tools |
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.
That shellcheck linter probably assumes the script is doing something dumb while assembling the QEMU invocation, where QEMU just needs commas in individual arguments. We could also quote those, but I think disabling the warning is the better choice for readability. 👍
|
Fixed a typo in one of the commit messages. |
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.
Some minor nits, but nothing blocking.
This commit checks the bash scripts under tools during the `check-lints` task. For more targeted linting, `check-lints` was also split into `check-clippy` and `check-shell` which can be called individually.
|
I rebased locally and ran |
Description of changes:
During the
check-lints
stage of the build, ShellCheck will analyze any bash scripts under thetools
directory and raise an error for any findings with a severity ofwarning
or above.For more targeted linting,
check-lints
was also split intocheck-clippy
andcheck-shell
which can be called individually.Also addressed several warnings to avoid breaking the build.
Testing done:
Ran with and without the
tools: fix ShellCheck warnings
commit.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.