From 9b8d04fbddfb11174ece946656f8bf5994ff36e6 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Tue, 10 Mar 2020 13:34:40 -0400 Subject: [PATCH] Revert one incorrect change from 172aa7c --- src/ShellCheck/Analytics.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs index 5ad51d7..fcea038 100644 --- a/src/ShellCheck/Analytics.hs +++ b/src/ShellCheck/Analytics.hs @@ -585,8 +585,9 @@ checkForInQuoted _ (T_ForIn _ f [T_NormalWord _ [word@(T_DoubleQuoted id list)]] checkForInQuoted _ (T_ForIn _ f [T_NormalWord _ [T_SingleQuoted id _]] _) = warn id 2041 "This is a literal string. To run as a command, use $(..) instead of '..' . " checkForInQuoted _ (T_ForIn _ f [T_NormalWord _ [T_Literal id s]] _) = - if ',' `elem` s && '{' `notElem` s - then warn id 2042 "Use spaces, not commas, to separate loop elements." + if ',' `elem` s + then unless ('{' `elem` s) $ + warn id 2042 "Use spaces, not commas, to separate loop elements." else warn id 2043 "This loop will only ever run once for a constant value. Did you perhaps mean to loop over dir/*, $var or $(cmd)?" checkForInQuoted _ _ = return ()