mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 21:41:34 -07:00
Allow SC2243 and SC2244 to trigger with quotes, add fix
This commit is contained in:
parent
f6bc009331
commit
73822c3588
4 changed files with 28 additions and 15 deletions
|
@ -155,11 +155,14 @@ err id code str = addComment $ makeComment ErrorC id code str
|
|||
info id code str = addComment $ makeComment InfoC id code str
|
||||
style id code str = addComment $ makeComment StyleC id code str
|
||||
|
||||
warnWithFix id code str fix = addComment $
|
||||
let comment = makeComment WarningC id code str in
|
||||
comment {
|
||||
tcFix = Just fix
|
||||
}
|
||||
warnWithFix :: MonadWriter [TokenComment] m => Id -> Code -> String -> Fix -> m ()
|
||||
warnWithFix = addCommentWithFix WarningC
|
||||
styleWithFix :: MonadWriter [TokenComment] m => Id -> Code -> String -> Fix -> m ()
|
||||
styleWithFix = addCommentWithFix StyleC
|
||||
|
||||
addCommentWithFix :: MonadWriter [TokenComment] m => Severity -> Id -> Code -> String -> Fix -> m ()
|
||||
addCommentWithFix severity id code str fix =
|
||||
addComment $ makeCommentWithFix severity id code str fix
|
||||
|
||||
makeCommentWithFix :: Severity -> Id -> Code -> String -> Fix -> TokenComment
|
||||
makeCommentWithFix severity id code str fix =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue