-
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
Wrong Error? #3136
Comments
Is the function/alias 'do_on_exit' defined in the original script?
Wiley
…On Mon, Feb 3, 2025, 16:05 Matthew O. Persico ***@***.***> wrote:
For bugs
- Rule Id (if any, e.g. SC1000): SC2154, SC2154
- My shellcheck version (shellcheck --version or 'online'): 0.10.0
- I tried on shellcheck.net and verified that this is still a problem
on the latest commit
- It's not reproducible on shellcheck.net, but I think that's because
it's an OS, configuration or encoding issue
For new checks and feature suggestions
- shellcheck.net (i.e. the latest commit) currently gives no useful
warnings about this
- I searched through https://github.com/koalaman/shellcheck/issues and
didn't find anything related
Here's a snippet or screenshot that shows the problem:
#!/bin/bash
do_on_exit END
END()
{
kill "$tailpid" 2>/dev/null
kill "$zenitypid" 2>/dev/null
}
Here's what shellcheck currently says:
In bin/mailxmon line 14:
kill "$tailpid" 2>/dev/null
^-------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
In bin/mailxmon line 15:
kill "$zenitypid" 2>/dev/null
^---------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
Here's what I wanted or expected to see:
Line 7 SC2154: tailpid is referenced but not assigned.
Line 8 SC2154: zenitypid is referenced but not assigned.
Looks like I am getting the wrong error using
$ shellcheck --version
ShellCheck - shell script analysis tool
version: 0.10.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net
$ uname -a
Linux dev-10-34-32-2 4.18.0-553.32.1.el8_10.x86_64 #1 SMP Mon Dec 2 06:32:20 EST 2024 x86_64 x86_64 x86_64 GNU/Linux
—
Reply to this email directly, view it on GitHub
<#3136>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUF2F2652XZBGE5GY4SJ7ZT2N773BAVCNFSM6AAAAABWNJTXQCVHI2DSMVQWIX3LMV43ASLTON2WKOZSHAZDQOBRHAYDEMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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.10.0For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Looks like I am getting the wrong error using
The text was updated successfully, but these errors were encountered: