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
bats: bogus SC2034 (no support for bats' load?) #2041
Comments
kolyshkin
added a commit
to kolyshkin/cri-o
that referenced
this issue
Aug 28, 2020
This is a bogus warning, for details please see koalaman/shellcheck#2041 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin
added a commit
to kolyshkin/cri-o
that referenced
this issue
Aug 28, 2020
This is a bogus warning, for details please see koalaman/shellcheck#2041 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin
added a commit
to kolyshkin/cri-o
that referenced
this issue
Aug 28, 2020
This is a bogus warning, for details please see koalaman/shellcheck#2041 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin
added a commit
to kolyshkin/cri-o
that referenced
this issue
Sep 18, 2020
This is a bogus warning, for details please see koalaman/shellcheck#2041 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin
changed the title
bogus SC2034 for bats (no support for bats' load?)
bats: bogus SC2034 (no support for bats' load?)
Oct 9, 2020
@koalaman PTAL 🙏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For bugs
shellcheck --version
or "online"): 0.7.1(I can't try since my repro consists of two files)
Here's a snippet or screenshot that shows the problem:
helpers.bash:
a.bats:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
No errors, like in the following example using pure bash:
helpers.bash:
a.sh:
Test execution to see if it works:
shellcheck run (shows no warnings):
Additional information
In case I move
function prepare()
fromhelpers.bash
to the main a.bats file, the warning goes away.The very same repro using pure bash (see above) does not result in a warning.
This probably means that bats'
load
statement is not recognized in a way similar to bash'source
.The text was updated successfully, but these errors were encountered: