mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-11 07:36:29 -07:00
Warn about missing and invalid subscripts in array assignments.
This commit is contained in:
parent
bd9d05c759
commit
5669702362
2 changed files with 46 additions and 2 deletions
|
@ -297,7 +297,7 @@ getAssociativeArrays t =
|
|||
f :: Token -> Writer [String] ()
|
||||
f t@(T_SimpleCommand {}) = fromMaybe (return ()) $ do
|
||||
name <- getCommandName t
|
||||
guard $ name == "declare"
|
||||
guard $ name == "declare" || name == "typeset"
|
||||
let flags = getAllFlags t
|
||||
guard $ elem "A" $ map snd flags
|
||||
let args = map fst . filter ((==) "" . snd) $ flags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue