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(` "fileName": "`, message.fileName.replace("\\", "\\\\").replace(`"`, `\"`), `",`);
|
||||||
writeln(` "line": `, message.startLine, `,`);
|
writeln(` "line": `, message.startLine, `,`);
|
||||||
writeln(` "column": `, message.startColumn, `,`);
|
writeln(` "column": `, message.startColumn, `,`);
|
||||||
|
writeln(` "index": `, message.startIndex, `,`);
|
||||||
writeln(` "endLine": `, message.endLine, `,`);
|
writeln(` "endLine": `, message.endLine, `,`);
|
||||||
writeln(` "endColumn": `, message.endColumn, `,`);
|
writeln(` "endColumn": `, message.endColumn, `,`);
|
||||||
|
writeln(` "endIndex": `, message.endIndex, `,`);
|
||||||
writeln(` "message": "`, message.message.replace("\\", "\\\\").replace(`"`, `\"`), `",`);
|
writeln(` "message": "`, message.message.replace("\\", "\\\\").replace(`"`, `\"`), `",`);
|
||||||
if (message.supplemental.length)
|
if (message.supplemental.length)
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,8 +61,10 @@ class DScannerJsonReporter
|
||||||
"fileName": JSONValue(issue.message.fileName),
|
"fileName": JSONValue(issue.message.fileName),
|
||||||
"line": JSONValue(issue.message.startLine),
|
"line": JSONValue(issue.message.startLine),
|
||||||
"column": JSONValue(issue.message.startColumn),
|
"column": JSONValue(issue.message.startColumn),
|
||||||
|
"index": JSONValue(issue.message.startIndex),
|
||||||
"endLine": JSONValue(issue.message.endLine),
|
"endLine": JSONValue(issue.message.endLine),
|
||||||
"endColumn": JSONValue(issue.message.endColumn),
|
"endColumn": JSONValue(issue.message.endColumn),
|
||||||
|
"endIndex": JSONValue(issue.message.endIndex),
|
||||||
"message": JSONValue(issue.message.message),
|
"message": JSONValue(issue.message.message),
|
||||||
"type": JSONValue(issue.type),
|
"type": JSONValue(issue.type),
|
||||||
"supplemental": JSONValue(
|
"supplemental": JSONValue(
|
||||||
|
@ -71,8 +73,10 @@ class DScannerJsonReporter
|
||||||
"fileName": JSONValue(a.fileName),
|
"fileName": JSONValue(a.fileName),
|
||||||
"line": JSONValue(a.startLine),
|
"line": JSONValue(a.startLine),
|
||||||
"column": JSONValue(a.startColumn),
|
"column": JSONValue(a.startColumn),
|
||||||
|
"index": JSONValue(a.startIndex),
|
||||||
"endLine": JSONValue(a.endLine),
|
"endLine": JSONValue(a.endLine),
|
||||||
"endColumn": JSONValue(a.endColumn),
|
"endColumn": JSONValue(a.endColumn),
|
||||||
|
"endIndex": JSONValue(a.endIndex),
|
||||||
"message": JSONValue(a.message),
|
"message": JSONValue(a.message),
|
||||||
])
|
])
|
||||||
).array
|
).array
|
||||||
|
|
Loading…
Reference in New Issue