mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-19 21:03:51 -07:00
Don't warn about &&+|| when used with return
This commit is contained in:
parent
f9aeabc245
commit
deab146fab
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue