From 090b94161d8fa8601b3b007297cf96b5616ff028 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sat, 17 Nov 2012 10:53:39 -0800 Subject: [PATCH] Fixed incorrect warning for foo=$3 --- ShellCheck/Analytics.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ShellCheck/Analytics.hs b/ShellCheck/Analytics.hs index 57aa006..676970c 100644 --- a/ShellCheck/Analytics.hs +++ b/ShellCheck/Analytics.hs @@ -157,6 +157,7 @@ prop_checkMissingPositionalQuotes = verifyFull checkMissingPositionalQuotes "rm prop_checkMissingPositionalQuotes2 = verifyFull checkMissingPositionalQuotes "rm ${10//foo/bar}" prop_checkMissingPositionalQuotes3 = verifyNotFull checkMissingPositionalQuotes "(( $1 + 3 ))" prop_checkMissingPositionalQuotes4 = verifyNotFull checkMissingPositionalQuotes "if [[ $2 -gt 14 ]]; then true; fi" +prop_checkMissingPositionalQuotes5 = verifyNotFull checkMissingPositionalQuotes "foo=$3 env" checkMissingPositionalQuotes t m = runBasicAnalysis cq t m where @@ -337,6 +338,7 @@ inUnquotableContext tree t = TA_Binary _ _ _ _ -> True TA_Trinary _ _ _ _ -> True TA_Expansion _ _ -> True + T_Assignment _ _ _ -> True T_Redirecting _ _ _ -> False x -> case Map.lookup (getId x) tree of Nothing -> False