From deab146fab8c1a10636ec19be494be055ee258ee Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Fri, 9 May 2014 18:08:55 -0700 Subject: [PATCH] Don't warn about &&+|| when used with return --- ShellCheck/Analytics.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellCheck/Analytics.hs b/ShellCheck/Analytics.hs index 5dafe56..498e030 100644 --- a/ShellCheck/Analytics.hs +++ b/ShellCheck/Analytics.hs @@ -814,7 +814,7 @@ checkShorthandIf _ (T_AndIf id _ (T_OrIf _ _ (T_Pipeline _ _ t))) where isOk [t] = isAssignment t || (fromMaybe False $ do name <- getCommandBasename t - return $ name `elem` ["echo", "exit"]) + return $ name `elem` ["echo", "exit", "return"]) isOk _ = False checkShorthandIf _ _ = return ()