From e8501151dd5d4ad90687deefa434f424701b6c7c Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sun, 5 Apr 2020 20:04:54 -0400 Subject: [PATCH] Use a guard instead of unless --- src/ShellCheck/Checks/Commands.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Checks/Commands.hs b/src/ShellCheck/Checks/Commands.hs index 0d887dd..9e19ab5 100644 --- a/src/ShellCheck/Checks/Commands.hs +++ b/src/ShellCheck/Checks/Commands.hs @@ -482,7 +482,7 @@ prop_checkNonportableSignals7 = verifyNot checkNonportableSignals "trap 'stop' i checkNonportableSignals = CommandCheck (Exactly "trap") (f . arguments) where f args = case args of - first:rest -> unless (isFlag first) $ mapM_ check rest + first:rest | not $ isFlag first -> mapM_ check rest _ -> return () check param = sequence_ $ do