Skip to content
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

v0.10.0 miscategorizes uncalled function as unreachable code #3138

Closed
1 of 4 tasks
matthewpersico opened this issue Feb 4, 2025 · 2 comments
Closed
1 of 4 tasks

v0.10.0 miscategorizes uncalled function as unreachable code #3138

matthewpersico opened this issue Feb 4, 2025 · 2 comments

Comments

@matthewpersico
Copy link

matthewpersico commented Feb 4, 2025

For bugs

  • Rule Id (if any, e.g. SC1000): SC2329
  • My shellcheck version (shellcheck --version or 'online'): v0.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

Here's a snippet or screenshot that shows the problem:

#!/bin/bash

main()
{
        echo I am in main
}

subber ()
{
        echo I am in subber
}

main
exit

Here's what shellcheck v0.10.0 currently says:

In /home/mpersico5/sctest line 10:
echo I am in subber
^-----------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).

Here's what I wanted or expected to see:

Line 8	SC2329: This function is never invoked. Check usage (or ignored if invoked indirectly).

Can we get a new release v0.11.0? I cannot bring unreleased/untagged HEAD code into my org. Thank you.

@matthewpersico
Copy link
Author

From my local testing, it appears that v0.9.0 has the same issue.

@brother
Copy link
Collaborator

brother commented Feb 6, 2025

Dupe of #3137

@brother brother closed this as completed Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants