mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-23 12:29:36 +08:00
Use a guard instead of unless
This commit is contained in:
@@ -482,7 +482,7 @@ prop_checkNonportableSignals7 = verifyNot checkNonportableSignals "trap 'stop' i
|
|||||||
checkNonportableSignals = CommandCheck (Exactly "trap") (f . arguments)
|
checkNonportableSignals = CommandCheck (Exactly "trap") (f . arguments)
|
||||||
where
|
where
|
||||||
f args = case args of
|
f args = case args of
|
||||||
first:rest -> unless (isFlag first) $ mapM_ check rest
|
first:rest | not $ isFlag first -> mapM_ check rest
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
|
|
||||||
check param = sequence_ $ do
|
check param = sequence_ $ do
|
||||||
|
Reference in New Issue
Block a user