You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My shellcheck version (shellcheck --version or "online"): Tried 0.8.0 and 0.10.0
Here's a snippet or screenshot that shows the problem:
I have several scripts with medium amounts of code in them. To allow for common functions to be scattered across those scripts each of them got an include guard like
This works just fine for execution, but shellchecks seems to have problems with it. It does not detect that a script was already sourced and keeps sourcing them up to a certain point when called with -x.
Test case: 4 scripts like the above which all source each other, e.g:
#!/bin/bashif [[ -v A_SOURCED ]];thenreturnelsereadonly A_SOURCED=true
fisource b
source c
source d
Add sourcing /usr/bin/clevis-luks-common-functions to one of them to have some actual code to parse.
Here's what shellcheck currently says:
time shellcheck -x a
real 0m4.254s
user 0m4.138s
sys 0m0.116s
Here's what I wanted or expected to see:
Faster parsing by ignoring scripts already "seen".
For real life examples I'm looking at times of 20+ seconds for shellcheck which really hurts when switching files via editor integration
The text was updated successfully, but these errors were encountered:
shellcheck --version
or "online"): Tried 0.8.0 and 0.10.0Here's a snippet or screenshot that shows the problem:
I have several scripts with medium amounts of code in them. To allow for common functions to be scattered across those scripts each of them got an include guard like
This works just fine for execution, but shellchecks seems to have problems with it. It does not detect that a script was already sourced and keeps sourcing them up to a certain point when called with
-x
.Test case: 4 scripts like the above which all source each other, e.g:
Add sourcing
/usr/bin/clevis-luks-common-functions
to one of them to have some actual code to parse.Here's what shellcheck currently says:
time shellcheck -x a
real 0m4.254s
user 0m4.138s
sys 0m0.116s
Here's what I wanted or expected to see:
Faster parsing by ignoring scripts already "seen".
For real life examples I'm looking at times of 20+ seconds for shellcheck which really hurts when switching files via editor integration
The text was updated successfully, but these errors were encountered: