-
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
SC2329 should be transitive #3054
Comments
Hm. I get a different result on a Fedora 40 local vm instance: SC2317 on
line 4, 'echo "$*"', "(info): Command appears unreachable...." The rpm is
'ShellCheck-0.9.0-6.fc40.x86_64'. The same output as yours on shellcheck.net,
though.
Wiley
…On Fri, Sep 6, 2024, 4:51 AM Enrico Scholz ***@***.***> wrote:
For bugs
- Rule id SC2329
- My shellcheck version (shellcheck --version or "online"): online;
0.9.0 shows similar results but for SC2317
- The rule's wiki page does not already cover this (e.g.
https://shellcheck.net/wiki/SC2086)
- I tried on https://www.shellcheck.net/ and verified that this is
still a problem on the latest commit
Here's a snippet or screenshot that shows the problem:
#! /bin/bash
note() {
echo "$*"
}
# shellcheck disable=SC2317,SC2329tool_a() {
note a
}
# shellcheck disable=SC2317,SC2329tool_b() {
echo b
}
RC=0
for i in a b; do
tool_"$i" || RC=1done
exit $RC
Here's what shellcheck currently says:
[Line 3:](javascript:setPosition(3, 1))
note() {
^-- [SC2329](https://www.shellcheck.net/wiki/SC2329) (info): This function is never invoked. Check usage (or ignored if invoked indirectly).
Here's what I wanted or expected to see:
no warnings;
SC2329 should not be triggered for functions which are called by functions
with disabled SC2329 check
—
Reply to this email directly, view it on GitHub
<#3054>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUF2F2ZN3ZS4KPZTURZYAYDZVGJL3AVCNFSM6AAAAABNYNTW56VHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTAMRVGU3DCMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
SC2329 seems to have been splitted off from SC2317 in recent versions (used on http://spellcheck.net, but not (yet) by Fedora 40) |
This should be working as described on the latest git commit, and also on shellcheck.net (which may not have been published when this issue was filed). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For bugs
shellcheck --version
or "online"): online; 0.9.0 shows similar results but for SC2317Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
no warnings;
SC2329 should not be triggered for functions which are called by functions with disabled SC2329 check
The text was updated successfully, but these errors were encountered: