add index and endIndex to JSON formats
This commit is contained in:
parent
b115a6333a
commit
146fec75d8
|
@ -157,8 +157,10 @@ void writeJSON(Message message)
|
|||
writeln(` "fileName": "`, message.fileName.replace("\\", "\\\\").replace(`"`, `\"`), `",`);
|
||||
writeln(` "line": `, message.startLine, `,`);
|
||||
writeln(` "column": `, message.startColumn, `,`);
|
||||
writeln(` "index": `, message.startIndex, `,`);
|
||||
writeln(` "endLine": `, message.endLine, `,`);
|
||||
writeln(` "endColumn": `, message.endColumn, `,`);
|
||||
writeln(` "endIndex": `, message.endIndex, `,`);
|
||||
writeln(` "message": "`, message.message.replace("\\", "\\\\").replace(`"`, `\"`), `",`);
|
||||
if (message.supplemental.length)
|
||||
{
|
||||
|
|
|
@ -61,8 +61,10 @@ class DScannerJsonReporter
|
|||
"fileName": JSONValue(issue.message.fileName),
|
||||
"line": JSONValue(issue.message.startLine),
|
||||
"column": JSONValue(issue.message.startColumn),
|
||||
"index": JSONValue(issue.message.startIndex),
|
||||
"endLine": JSONValue(issue.message.endLine),
|
||||
"endColumn": JSONValue(issue.message.endColumn),
|
||||
"endIndex": JSONValue(issue.message.endIndex),
|
||||
"message": JSONValue(issue.message.message),
|
||||
"type": JSONValue(issue.type),
|
||||
"supplemental": JSONValue(
|
||||
|
@ -71,8 +73,10 @@ class DScannerJsonReporter
|
|||
"fileName": JSONValue(a.fileName),
|
||||
"line": JSONValue(a.startLine),
|
||||
"column": JSONValue(a.startColumn),
|
||||
"index": JSONValue(a.startIndex),
|
||||
"endLine": JSONValue(a.endLine),
|
||||
"endColumn": JSONValue(a.endColumn),
|
||||
"endIndex": JSONValue(a.endIndex),
|
||||
"message": JSONValue(a.message),
|
||||
])
|
||||
).array
|
||||
|
|
Loading…
Reference in New Issue