mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-14 00:53:15 -07:00
Suggest IFS='' as style for assigning empty vars.
This commit is contained in:
parent
e8a2ac09c7
commit
2b2ee0a897
1 changed files with 1 additions and 0 deletions
|
@ -1124,6 +1124,7 @@ readAssignmentWord = try $ do
|
||||||
value <- readArray <|> readNormalWord
|
value <- readArray <|> readNormalWord
|
||||||
spacing
|
spacing
|
||||||
when (space ++ space2 /= "") $ parseNoteAt pos ErrorC "Don't put spaces around the = in assignments."
|
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
|
return $ T_Assignment id variable value
|
||||||
|
|
||||||
readArray = do
|
readArray = do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue