From 4dfd7eb1cfafb920f23c1fd509de7e075246fcb8 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Thu, 24 Oct 2019 10:33:17 -0700 Subject: [PATCH] Use single quotes for the format string example in SC2059 --- src/ShellCheck/Checks/Commands.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Checks/Commands.hs b/src/ShellCheck/Checks/Commands.hs index 441e43f..7f06862 100644 --- a/src/ShellCheck/Checks/Commands.hs +++ b/src/ShellCheck/Checks/Commands.hs @@ -573,7 +573,7 @@ checkPrintfVar = CommandCheck (Exactly "printf") (f . arguments) where unless ('%' `elem` concat (oversimplify format) || isLiteral format) $ 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 onlyTrailingTs format argCount = all (== 'T') $ drop argCount format