mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-10 23:32:57 -07:00
Improve spans for some warnings
This commit is contained in:
parent
7138abff4b
commit
868a7be33e
4 changed files with 24 additions and 14 deletions
|
@ -2682,8 +2682,8 @@ readAssignmentWordExt lenient = try $ do
|
|||
indices <- many readArrayIndex
|
||||
hasLeftSpace <- fmap (not . null) spacing
|
||||
pos <- getPosition
|
||||
op <- readAssignmentOp
|
||||
id <- endSpan start
|
||||
op <- readAssignmentOp
|
||||
hasRightSpace <- fmap (not . null) spacing
|
||||
isEndOfCommand <- fmap isJust $ optionMaybe (try . lookAhead $ (void (oneOf "\r\n;&|)") <|> eof))
|
||||
if not hasLeftSpace && (hasRightSpace || isEndOfCommand)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue