Don't warn about &&+|| when used with return
This commit is contained in:
parent
f9aeabc245
commit
deab146fab
|
@ -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 ()
|
||||
|
||||
|
|
Loading…
Reference in New Issue