mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-28 10:35:13 +08:00
SC1068 (var = x) now alternatively suggests quoting (fixes #1412)
This commit is contained in:
@@ -2715,9 +2715,10 @@ readAssignmentWordExt lenient = try $ do
|
|||||||
when (hasLeftSpace || hasRightSpace) $
|
when (hasLeftSpace || hasRightSpace) $
|
||||||
parseNoteAt pos ErrorC 1068 $
|
parseNoteAt pos ErrorC 1068 $
|
||||||
"Don't put spaces around the "
|
"Don't put spaces around the "
|
||||||
++ if op == Append
|
++ (if op == Append
|
||||||
then "+= when appending."
|
then "+= when appending"
|
||||||
else "= in assignments."
|
else "= in assignments")
|
||||||
|
++ " (or quote to make it literal)."
|
||||||
value <- readArray <|> readNormalWord
|
value <- readArray <|> readNormalWord
|
||||||
spacing
|
spacing
|
||||||
return $ T_Assignment id op variable indices value
|
return $ T_Assignment id op variable indices value
|
||||||
|
Reference in New Issue
Block a user