Nest alertCounts object in event_report.properties (#1770)
This commit is contained in:
parent
d6c8719550
commit
863a05b28b
6 changed files with 16 additions and 4 deletions
4
lib/analyze.js
generated
4
lib/analyze.js
generated
|
|
@ -223,7 +223,9 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
|||
completed_at: endTimeInterpretResults.toISOString(),
|
||||
exit_status: "success",
|
||||
language,
|
||||
properties: perQueryAlertCounts,
|
||||
properties: {
|
||||
alertCounts: perQueryAlertCounts,
|
||||
},
|
||||
};
|
||||
if (statusReport["event_reports"] === undefined) {
|
||||
statusReport["event_reports"] = [];
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
4
lib/analyze.test.js
generated
4
lib/analyze.test.js
generated
|
|
@ -154,6 +154,8 @@ const util = __importStar(require("./util"));
|
|||
if (builtinStatusReport.event_reports) {
|
||||
for (const eventReport of builtinStatusReport.event_reports) {
|
||||
t.deepEqual(eventReport.event, "codeql database interpret-results");
|
||||
t.true("properties" in eventReport);
|
||||
t.true("alertCounts" in eventReport.properties);
|
||||
}
|
||||
}
|
||||
config.queries[language] = {
|
||||
|
|
@ -181,6 +183,8 @@ const util = __importStar(require("./util"));
|
|||
if (customStatusReport.event_reports) {
|
||||
for (const eventReport of customStatusReport.event_reports) {
|
||||
t.deepEqual(eventReport.event, "codeql database interpret-results");
|
||||
t.true("properties" in eventReport);
|
||||
t.true("alertCounts" in eventReport.properties);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -175,6 +175,8 @@ test("status report fields and search path setting", async (t) => {
|
|||
if (builtinStatusReport.event_reports) {
|
||||
for (const eventReport of builtinStatusReport.event_reports) {
|
||||
t.deepEqual(eventReport.event, "codeql database interpret-results");
|
||||
t.true("properties" in eventReport);
|
||||
t.true("alertCounts" in eventReport.properties!);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -214,6 +216,8 @@ test("status report fields and search path setting", async (t) => {
|
|||
if (customStatusReport.event_reports) {
|
||||
for (const eventReport of customStatusReport.event_reports) {
|
||||
t.deepEqual(eventReport.event, "codeql database interpret-results");
|
||||
t.true("properties" in eventReport);
|
||||
t.true("alertCounts" in eventReport.properties!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -372,7 +372,9 @@ export async function runQueries(
|
|||
completed_at: endTimeInterpretResults.toISOString(),
|
||||
exit_status: "success",
|
||||
language,
|
||||
properties: perQueryAlertCounts,
|
||||
properties: {
|
||||
alertCounts: perQueryAlertCounts,
|
||||
},
|
||||
};
|
||||
|
||||
if (statusReport["event_reports"] === undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue