mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-19 13:00:54 -07:00
Added warning for &;
This commit is contained in:
parent
bc810e9eab
commit
9bc0d57b14
1 changed files with 4 additions and 1 deletions
|
@ -592,9 +592,12 @@ readHereString = do
|
||||||
readNewlineList = many1 ((newline <|> carriageReturn) `thenSkip` spacing)
|
readNewlineList = many1 ((newline <|> carriageReturn) `thenSkip` spacing)
|
||||||
readLineBreak = optional readNewlineList
|
readLineBreak = optional readNewlineList
|
||||||
|
|
||||||
|
prop_roflol = isWarning readScript "a &; b"
|
||||||
|
prop_roflol2 = isOk readScript "a & b"
|
||||||
readSeparatorOp = do
|
readSeparatorOp = do
|
||||||
notFollowedBy (g_AND_IF <|> g_DSEMI)
|
notFollowedBy (g_AND_IF <|> g_DSEMI)
|
||||||
f <- char ';' <|> char '&'
|
f <- (try $ char '&' >> spacing >> char ';' >> parseProblem ErrorC "It's not 'foo &; bar', just 'foo & bar'. " >> return '&')
|
||||||
|
<|> char ';' <|> char '&'
|
||||||
spacing
|
spacing
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue