mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-13 08:33:20 -07:00
Optionally suggest [[ over [ in Bash scripts (-o require-double-brackets) (fixes #887)
This commit is contained in:
parent
fbc8d2cb2f
commit
fe81dc1c27
3 changed files with 44 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue