mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-28 00:07:03 +08:00
Improve spans for some warnings
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user