mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-07 01:59:27 +08:00
Suggest IFS='' as style for assigning empty vars.
This commit is contained in:
@@ -1124,6 +1124,7 @@ readAssignmentWord = try $ do
|
||||
value <- readArray <|> readNormalWord
|
||||
spacing
|
||||
when (space ++ space2 /= "") $ parseNoteAt pos ErrorC "Don't put spaces around the = in assignments."
|
||||
when (space == "" && space2 /= "") $ parseNoteAt pos StyleC "Use var='' if you intended to assign the empty string."
|
||||
return $ T_Assignment id variable value
|
||||
|
||||
readArray = do
|
||||
|
Reference in New Issue
Block a user