Skip to content

Commit

Permalink
🐛 QD-10875 initialize title after annotations filtering to display th…
Browse files Browse the repository at this point in the history
…e count of problems correctly (#454)

Co-authored-by: Andrei Iurko <[email protected]>
  • Loading branch information
AndreiIurko and Andrei Iurko authored Mar 5, 2025
1 parent 61a97cc commit afd7610
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scan/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137412,8 +137412,8 @@ var require_annotations = __commonJS({
let title = "No new problems found by ";
let annotations = [];
if ((_a = run.results) === null || _a === void 0 ? void 0 : _a.length) {
title = `${run.results.length} ${(0, output_12.getProblemPlural)(run.results.length)} found by `;
annotations = run.results.filter((result) => result.baselineState !== "unchanged" && result.baselineState !== "absent").map((result) => parseResult2(result, rules)).filter((a) => a !== null && a !== void 0);
title = `${annotations.length} ${(0, output_12.getProblemPlural)(annotations.length)} found by `;
}
const name = run.tool.driver.fullName || "Qodana";
title += name;
Expand Down
6 changes: 3 additions & 3 deletions scan/src/annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@ export function parseSarif(path: string): Output {
let title = 'No new problems found by '
let annotations: Annotation[] = []
if (run.results?.length) {
title = `${run.results.length} ${getProblemPlural(
run.results.length
)} found by `
annotations = run.results
.filter(
result =>
Expand All @@ -180,6 +177,9 @@ export function parseSarif(path: string): Output {
)
.map(result => parseResult(result, rules))
.filter((a): a is Annotation => a !== null && a !== undefined)
title = `${annotations.length} ${getProblemPlural(
annotations.length
)} found by `
}
const name = run.tool.driver.fullName || 'Qodana'
title += name
Expand Down
2 changes: 1 addition & 1 deletion vsts/vss-extension.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "qodana-dev",
"name": "Qodana (Dev)",
"version": "2024.3.198",
"version": "2024.3.199",
"publisher": "JetBrains",
"targets": [
{
Expand Down

0 comments on commit afd7610

Please sign in to comment.