mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 12:37:14 +08:00
Optionally suggest [[ over [ in Bash scripts (-o require-double-brackets) (fixes #887)
This commit is contained in:
@@ -178,7 +178,8 @@ makeCommentWithFix :: Severity -> Id -> Code -> String -> Fix -> TokenComment
|
||||
makeCommentWithFix severity id code str fix =
|
||||
let comment = makeComment severity id code str
|
||||
withFix = comment {
|
||||
tcFix = Just fix
|
||||
-- If fix is empty, pretend it wasn't there.
|
||||
tcFix = if null (fixReplacements fix) then Nothing else Just fix
|
||||
}
|
||||
in force withFix
|
||||
|
||||
|
Reference in New Issue
Block a user