Use single quotes for the format string example in SC2059
This commit is contained in:
parent
60f75e5b8a
commit
4dfd7eb1cf
|
@ -573,7 +573,7 @@ checkPrintfVar = CommandCheck (Exactly "printf") (f . arguments) where
|
||||||
|
|
||||||
unless ('%' `elem` concat (oversimplify format) || isLiteral format) $
|
unless ('%' `elem` concat (oversimplify format) || isLiteral format) $
|
||||||
info (getId format) 2059
|
info (getId format) 2059
|
||||||
"Don't use variables in the printf format string. Use printf \"..%s..\" \"$foo\"."
|
"Don't use variables in the printf format string. Use printf '..%s..' \"$foo\"."
|
||||||
where
|
where
|
||||||
onlyTrailingTs format argCount =
|
onlyTrailingTs format argCount =
|
||||||
all (== 'T') $ drop argCount format
|
all (== 'T') $ drop argCount format
|
||||||
|
|
Loading…
Reference in New Issue