mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 12:37:14 +08:00
PositionedComment and ParseNote contains end cols.
This change makes PositionedComment and ParseNote contain end columns. It additionally modifies the JSON formatter to show the end column in an "endColumn" property. No modifications to the messages shown by any other formatter have been made. Currently, all checks set the end column to the start column. It should now be possible however to start setting the end column in the parser. Additional work is needed to set the end column during AST analysis.
This commit is contained in:
@@ -37,10 +37,11 @@ format = do
|
||||
}
|
||||
|
||||
instance JSON (PositionedComment) where
|
||||
showJSON comment@(PositionedComment pos (Comment level code string)) = makeObj [
|
||||
("file", showJSON $ posFile pos),
|
||||
("line", showJSON $ posLine pos),
|
||||
("column", showJSON $ posColumn pos),
|
||||
showJSON comment@(PositionedComment start end (Comment level code string)) = makeObj [
|
||||
("file", showJSON $ posFile start),
|
||||
("line", showJSON $ posLine start),
|
||||
("column", showJSON $ posColumn start),
|
||||
("endColumn", showJSON $ posColumn end),
|
||||
("level", showJSON $ severityText comment),
|
||||
("code", showJSON code),
|
||||
("message", showJSON string)
|
||||
|
Reference in New Issue
Block a user