Closed ale5000-git closed 6 months ago
This bug only happens on https://www.shellcheck.net/ but not on the release.
Bug present at d80fdfa9e8e as well as the current HEAD (04a8624).
not sure what version "but not on the release." refers to, probably something before 0.10.0 as that falls between the two hashes above and both those show the same output locally.
I have tried v0.10.0 on Windows and I didn't get any "info".
So there 2 possibilities: 1) The bug doesn't happen on Windows, or 2) Dataflow Analysis is never active on Windows even when specifically asked.
Interesting. Did you get other info lines? (maybe the severity setting is passed somewhere?).
Sorry, I had an rc file in my repository and didn't remember it.
Now with --norc
I get:
Version 0.8.0 => OK
Version 0.9.0 => issue
Version 0.10.0 => issue
The line does appear to be unreachable, but ShellCheck should probably still not warn about uninvoked functions.
Just noticed now that all infos refer to the unused function.
In my opinion there should be a separate SC code (with a more clear message) for the unused functions (and just one per function).
@ale5000-git maybe you can clean up the original report here and retitle the issue to make it to the point?
or close and open new if that's preferred.
I am actually seeing Command appears to be unreachable.
for every line in a function that actually is called from later in the script. The lines that call the function are reachable, and shellcheck does not claim otherwise. I am running v0.10.0.
@stevecj Yours is a separate issue, also you need to post an example otherwise he cannot know why it happens.
Unreachable functions now have a separate SC2329, and unreachable commands within them will no longer emit SC2317. This also fixes x=$(y)
getting two separate SC2317, one for the assignment and one for the command in the substitution. Thanks!
For bugs
shellcheck --version
or "online"): onlineHere's a snippet or screenshot that shows the problem:
Script: https://github.com/micro5k/microg-unofficial-installer/blob/ecf1f9b/utils/device-info.sh
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Function is unused.
Edit: Updated.