mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 08:13:56 +08:00
Add :/. to chars recognized for \alias suppression (fixes #2287)
This commit is contained in:
@@ -2061,6 +2061,7 @@ prop_readSimpleCommand4 = isOk readSimpleCommand "typeset -a foo=(lol)"
|
|||||||
prop_readSimpleCommand5 = isOk readSimpleCommand "time if true; then echo foo; fi"
|
prop_readSimpleCommand5 = isOk readSimpleCommand "time if true; then echo foo; fi"
|
||||||
prop_readSimpleCommand6 = isOk readSimpleCommand "time -p ( ls -l; )"
|
prop_readSimpleCommand6 = isOk readSimpleCommand "time -p ( ls -l; )"
|
||||||
prop_readSimpleCommand7 = isOk readSimpleCommand "\\ls"
|
prop_readSimpleCommand7 = isOk readSimpleCommand "\\ls"
|
||||||
|
prop_readSimpleCommand7b = isOk readSimpleCommand "\\:"
|
||||||
prop_readSimpleCommand8 = isWarning readSimpleCommand "// Lol"
|
prop_readSimpleCommand8 = isWarning readSimpleCommand "// Lol"
|
||||||
prop_readSimpleCommand9 = isWarning readSimpleCommand "/* Lolbert */"
|
prop_readSimpleCommand9 = isWarning readSimpleCommand "/* Lolbert */"
|
||||||
prop_readSimpleCommand10 = isWarning readSimpleCommand "/**** Lolbert */"
|
prop_readSimpleCommand10 = isWarning readSimpleCommand "/**** Lolbert */"
|
||||||
@@ -2321,7 +2322,7 @@ readCmdName = do
|
|||||||
-- Ignore alias suppression
|
-- Ignore alias suppression
|
||||||
optional . try $ do
|
optional . try $ do
|
||||||
char '\\'
|
char '\\'
|
||||||
lookAhead $ variableChars
|
lookAhead $ variableChars <|> oneOf ":."
|
||||||
readCmdWord
|
readCmdWord
|
||||||
|
|
||||||
readCmdWord = do
|
readCmdWord = do
|
||||||
|
Reference in New Issue
Block a user