mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 18:52:52 +08:00
Mention correct operator when warning about spaces around += (#944)
This commit is contained in:
@@ -2443,7 +2443,11 @@ readAssignmentWordExt lenient = try $ do
|
|||||||
return $ T_Assignment id op variable indices value
|
return $ T_Assignment id op variable indices value
|
||||||
else do
|
else do
|
||||||
when (hasLeftSpace || hasRightSpace) $
|
when (hasLeftSpace || hasRightSpace) $
|
||||||
parseNoteAt pos ErrorC 1068 "Don't put spaces around the = in assignments."
|
parseNoteAt pos ErrorC 1068 $
|
||||||
|
"Don't put spaces around the "
|
||||||
|
++ if op == Append
|
||||||
|
then "+= when appending."
|
||||||
|
else "= in assignments."
|
||||||
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