mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 21:11:35 -07:00
Fix minor details in new Bats support
This commit is contained in:
parent
c97cb8cf54
commit
e1fe9be7af
4 changed files with 11 additions and 1 deletions
|
@ -770,7 +770,7 @@ prop_checkLocalScope2 = verifyNot checkLocalScope "f() { local foo=3; }"
|
|||
checkLocalScope = CommandCheck (Exactly "local") $ \t ->
|
||||
whenShell [Bash, Dash] $ do -- Ksh allows it, Sh doesn't support local
|
||||
path <- getPathM t
|
||||
unless (any isFunction path) $
|
||||
unless (any isFunctionLike path) $
|
||||
err (getId $ getCommandTokenOrThis t) 2168 "'local' is only valid in functions."
|
||||
|
||||
prop_checkDeprecatedTempfile1 = verify checkDeprecatedTempfile "var=$(tempfile)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue