mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 05:21:34 -07:00
Use isNothing instead of reimplementing it
This commit is contained in:
parent
7fc9496320
commit
8f0448133c
1 changed files with 1 additions and 2 deletions
|
@ -3250,9 +3250,8 @@ checkPipeToNowhere _ t =
|
||||||
"Redirecting to '" ++ name ++ "', a command that doesn't read stdin. " ++ suggestion
|
"Redirecting to '" ++ name ++ "', a command that doesn't read stdin. " ++ suggestion
|
||||||
|
|
||||||
-- Could any words in a SimpleCommand consume stdin (e.g. echo "$(cat)")?
|
-- Could any words in a SimpleCommand consume stdin (e.g. echo "$(cat)")?
|
||||||
hasAdditionalConsumers t = fromMaybe True $ do
|
hasAdditionalConsumers t = isNothing $
|
||||||
doAnalysis (guard . not . mayConsume) t
|
doAnalysis (guard . not . mayConsume) t
|
||||||
return False
|
|
||||||
|
|
||||||
mayConsume t =
|
mayConsume t =
|
||||||
case t of
|
case t of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue