Skip to content

Commit f78714e

Browse files
committed
Add ":" alongside "true" for SC2015
1 parent de07ec1 commit f78714e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ShellCheck/Analytics.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ checkShorthandIf params x@(T_OrIf _ (T_AndIf id _ b) (T_Pipeline _ _ t))
890890
where
891891
isOk [t] = isAssignment t || fromMaybe False (do
892892
name <- getCommandBasename t
893-
return $ name `elem` ["echo", "exit", "return", "printf", "true"])
893+
return $ name `elem` ["echo", "exit", "return", "printf", "true", ":"])
894894
isOk _ = False
895895
inCondition = isCondition $ getPath (parentMap params) x
896896
checkShorthandIf _ _ = return ()

0 commit comments

Comments
 (0)