mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-06 21:57:04 +08:00
Added better message for SC1007, for 'var= value'
This commit is contained in:
@@ -1734,7 +1734,8 @@ readAssignmentWord = try $ do
|
||||
if space == "" && space2 /= ""
|
||||
then do
|
||||
when (variable /= "IFS") $
|
||||
parseNoteAt pos InfoC 1007 $ "Note that 'var= value' (with space after equals sign) is similar to 'var=\"\"; value'."
|
||||
parseNoteAt pos WarningC 1007
|
||||
"Remove space after = if trying to assign a value (for empty string, use var='' ... )."
|
||||
value <- readEmptyLiteral
|
||||
return $ T_Assignment id op variable index value
|
||||
else do
|
||||
|
Reference in New Issue
Block a user