mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-06 20:17:21 +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) $
|
||||
parseNoteAt pos ErrorC 1068 $
|
||||
"Don't put spaces around the "
|
||||
++ if op == Append
|
||||
then "+= when appending."
|
||||
else "= in assignments."
|
||||
++ (if op == Append
|
||||
then "+= when appending"
|
||||
else "= in assignments")
|
||||
++ " (or quote to make it literal)."
|
||||
value <- readArray <|> readNormalWord
|
||||
spacing
|
||||
return $ T_Assignment id op variable indices value
|
||||
|
Reference in New Issue
Block a user