mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
Mention correct operator when warning about spaces around += (#944)
This commit is contained in:
parent
8f31ae913b
commit
a10b924570
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue