Giter Site home page Giter Site logo

Comments (11)

koalaman avatar koalaman commented on September 27, 2024 2

The line does appear to be unreachable, but ShellCheck should probably still not warn about uninvoked functions.

from shellcheck.

ale5000-git avatar ale5000-git commented on September 27, 2024 1

I have tried v0.10.0 on Windows and I didn't get any "info".

from shellcheck.

ale5000-git avatar ale5000-git commented on September 27, 2024 1

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.

from shellcheck.

ale5000-git avatar ale5000-git commented on September 27, 2024 1

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

from shellcheck.

brother avatar brother commented on September 27, 2024 1

@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.

from shellcheck.

koalaman avatar koalaman commented on September 27, 2024 1

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!

from shellcheck.

brother avatar brother commented on September 27, 2024

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.

from shellcheck.

brother avatar brother commented on September 27, 2024

Interesting.
Did you get other info lines? (maybe the severity setting is passed somewhere?).

from shellcheck.

ale5000-git avatar ale5000-git commented on September 27, 2024

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).

from shellcheck.

stevecj avatar stevecj commented on September 27, 2024

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.

from shellcheck.

ale5000-git avatar ale5000-git commented on September 27, 2024

@stevecj
Yours is a separate issue, also you need to post an example otherwise he cannot know why it happens.

from shellcheck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.