mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-05 20:41:35 -07:00
Add ":" alongside "true" for SC2015
This commit is contained in:
parent
de07ec1c56
commit
f78714e0f6
1 changed files with 1 additions and 1 deletions
|
@ -890,7 +890,7 @@ checkShorthandIf params x@(T_OrIf _ (T_AndIf id _ b) (T_Pipeline _ _ t))
|
|||
where
|
||||
isOk [t] = isAssignment t || fromMaybe False (do
|
||||
name <- getCommandBasename t
|
||||
return $ name `elem` ["echo", "exit", "return", "printf", "true"])
|
||||
return $ name `elem` ["echo", "exit", "return", "printf", "true", ":"])
|
||||
isOk _ = False
|
||||
inCondition = isCondition $ getPath (parentMap params) x
|
||||
checkShorthandIf _ _ = return ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue