mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 13:31:36 -07:00
Use mapM_ and sequence_ instead of reimplementing them
This commit is contained in:
parent
cc424bac11
commit
ffbbfcfe25
4 changed files with 10 additions and 12 deletions
|
@ -382,7 +382,7 @@ getAssociativeArrays t =
|
|||
nub . execWriter $ doAnalysis f t
|
||||
where
|
||||
f :: Token -> Writer [String] ()
|
||||
f t@T_SimpleCommand {} = fromMaybe (return ()) $ do
|
||||
f t@T_SimpleCommand {} = sequence_ $ do
|
||||
name <- getCommandName t
|
||||
let assocNames = ["declare","local","typeset"]
|
||||
guard $ elem name assocNames
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue