mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2317 (markdown)
@@ -67,6 +67,12 @@ run-test3
|
|||||||
|
|
||||||
Defined functions are assumed to be reachable when the script ends (not exits) since another file may source and invoke them.
|
Defined functions are assumed to be reachable when the script ends (not exits) since another file may source and invoke them.
|
||||||
|
|
||||||
|
### More Problematic Code
|
||||||
|
|
||||||
|
You have defined two functions in the files you are sourcing whose names are the same but defined differently within their bodies. Then you will see the same error message albeit it will be mysterious at first. However, when invoking ShellCheck! on the ex command line I noticed that the whole definition of the **earlier seen** definition was ignored. Indeed every message was that every line was unreachable.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Related resources:
|
### Related resources:
|
||||||
|
|
||||||
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!
|
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!
|
Reference in New Issue
Block a user