-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Pass --enable=all
to shellcheck within contrib/
#12760
Merged
Merged
Conversation
This file contains 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
- Remove `SHELLCHECK_IGNORE` in favor of inline suppressions and more general `SHELLCHECK_OPTS`. - Exclude `SC2250` (turned on by `--enable=all`) globally - Pass `--enable=all` to shellcheck for scripts in contrib/: it's very important to catch errors early in areas that are not easily testable. Signed-off-by: szubersk <[email protected]>
gmelikov
approved these changes
Nov 13, 2021
@behlendorf Sorry for tagging explicitly you to draw your attention, I saw you accepting previous major shellcheck introduction. I'm not sure what the process of getting approving review is. |
behlendorf
approved these changes
Nov 30, 2021
@szubersk looks good, thanks for the nudge and sorry about the delay. |
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this pull request
Dec 11, 2021
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" There's no harm to this, of course, but hey Partially reverts 34eef3e (openzfs#12760), which broke this Signed-off-by: Ahelenia Ziemiańska <[email protected]>
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this pull request
Dec 11, 2021
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Signed-off-by: Ahelenia Ziemiańska <[email protected]>
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this pull request
Dec 12, 2021
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Signed-off-by: Ahelenia Ziemiańska <[email protected]>
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this pull request
Dec 14, 2021
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Signed-off-by: Ahelenia Ziemiańska <[email protected]>
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this pull request
Dec 17, 2021
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Signed-off-by: Ahelenia Ziemiańska <[email protected]>
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this pull request
Dec 21, 2021
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Signed-off-by: Ahelenia Ziemiańska <[email protected]>
behlendorf
pushed a commit
that referenced
this pull request
Dec 21, 2021
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (#12760), which broke this Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12835
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Feb 15, 2022
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12835
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Feb 16, 2022
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12835
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Feb 17, 2022
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12835
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
- Remove `SHELLCHECK_IGNORE` in favor of inline suppressions and more general `SHELLCHECK_OPTS`. - Exclude `SC2250` (turned on by `--enable=all`) globally - Pass `--enable=all` to shellcheck for scripts in contrib/: it's very important to catch errors early in areas that are not easily testable. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes openzfs#12760
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12835
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
- Remove `SHELLCHECK_IGNORE` in favor of inline suppressions and more general `SHELLCHECK_OPTS`. - Exclude `SC2250` (turned on by `--enable=all`) globally - Pass `--enable=all` to shellcheck for scripts in contrib/: it's very important to catch errors early in areas that are not easily testable. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes openzfs#12760
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
Bullseye shellcheck picks these up as SC2140, and it's right! @LIBFETCH_SONAME@ is already quoted, so dracut had "$d/"libcurl.so.4"" and i-t had ""libcurl.so.4"" Partially reverts 34eef3e (openzfs#12760), which broke this Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12835
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.
Motivation and Context
Leverage static code analysis to catch bugs in areas that are not easily testable, like initramfs/dracut scripts. If this change gets pulled in other areas could also use it. Shellcheck error
SC2250
has been suppressed as its reporting has low value, unless the code base is consistent in$var
vs.${var}
dilemma (OpenZFS is not).Description
Remove
SHELLCHECK_IGNORE
in favor of inline suppressionsand more general
SHELLCHECK_OPTS
.Exclude
SC2250
(turned on by--enable=all
) globally.Pass
--enable=all
to shellcheck for scripts in contrib/: it'svery important to catch errors early in areas that are not easily
testable.
How Has This Been Tested?
Run
make checkstyle
on Ubuntu 20.04 and Debian 12.Types of changes
Checklist:
Signed-off-by
.