mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 11:46:19 +08:00
Merge pull request #1097 from sdknudsen/fix/recognize-ids-with-underscores
Use readVariableName combinator
This commit is contained in:
@@ -392,7 +392,7 @@ withAnnotations anns =
|
||||
readConditionContents single =
|
||||
readCondContents `attempting` lookAhead (do
|
||||
pos <- getPosition
|
||||
s <- many1 letter
|
||||
s <- readVariableName
|
||||
when (s `elem` commonCommands) $
|
||||
parseProblemAt pos WarningC 1014 "Use 'if cmd; then ..' to check exit code, or 'if [[ $(cmd) == .. ]]' to check output.")
|
||||
|
||||
|
Reference in New Issue
Block a user