From 2b2ee0a8970a3eaaafd708d6352ab7a318a49ba1 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Tue, 27 Nov 2012 20:27:07 -0800 Subject: [PATCH] Suggest IFS='' as style for assigning empty vars. --- ShellCheck/Parser.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index 7e76357..1e01c3c 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -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