mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-22 06:13:54 -07:00
Revert one incorrect change from 172aa7c
This commit is contained in:
parent
68a03e05e5
commit
9b8d04fbdd
1 changed files with 3 additions and 2 deletions
|
@ -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 ()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue