diff --git a/packages/code-analyzer-core/output-templates/html-template-0.0.11.txt b/packages/code-analyzer-core/output-templates/html-template-0.0.12.txt similarity index 99% rename from packages/code-analyzer-core/output-templates/html-template-0.0.11.txt rename to packages/code-analyzer-core/output-templates/html-template-0.0.12.txt index b9a0494a..c5e3e564 100644 --- a/packages/code-analyzer-core/output-templates/html-template-0.0.11.txt +++ b/packages/code-analyzer-core/output-templates/html-template-0.0.12.txt @@ -258,7 +258,9 @@ } updateSummary(data2) { const uniqueFiles = new Set(data2.map((v) => v.file)); - (this.summary.textContent = `Found ${data2.length} violation${1 !== data2.length ? "s" : ""} across ${uniqueFiles.size} file${1 !== uniqueFiles.size ? "s" : ""}`), + 0 === data2.length + ? (this.summary.textContent = "Found 0 violations") + : (this.summary.textContent = `Found ${data2.length} violation${1 !== data2.length ? "s" : ""} across ${uniqueFiles.size} file${1 !== uniqueFiles.size ? "s" : ""}`), this.violationsTable.classList.toggle("hidden", 0 === data2.length); } updateBoxes(data2) { diff --git a/packages/code-analyzer-core/src/output-formats/results/html-run-results-format.ts b/packages/code-analyzer-core/src/output-formats/results/html-run-results-format.ts index b39ee3aa..1a230ab9 100644 --- a/packages/code-analyzer-core/src/output-formats/results/html-run-results-format.ts +++ b/packages/code-analyzer-core/src/output-formats/results/html-run-results-format.ts @@ -8,7 +8,7 @@ import { toJsonResultsOutput } from "./json-run-results-format"; -const HTML_TEMPLATE_VERSION: string = '0.0.11'; +const HTML_TEMPLATE_VERSION: string = '0.0.12'; const HTML_TEMPLATE_FILE: string = path.resolve(__dirname, '..', '..', '..', 'output-templates', `html-template-${HTML_TEMPLATE_VERSION}.txt`); /** diff --git a/packages/code-analyzer-core/test/test-data/expectedOutputFiles/multipleViolations.goldfile.html b/packages/code-analyzer-core/test/test-data/expectedOutputFiles/multipleViolations.goldfile.html index 86a79c50..d86dae2d 100644 --- a/packages/code-analyzer-core/test/test-data/expectedOutputFiles/multipleViolations.goldfile.html +++ b/packages/code-analyzer-core/test/test-data/expectedOutputFiles/multipleViolations.goldfile.html @@ -258,7 +258,9 @@ } updateSummary(data2) { const uniqueFiles = new Set(data2.map((v) => v.file)); - (this.summary.textContent = `Found ${data2.length} violation${1 !== data2.length ? "s" : ""} across ${uniqueFiles.size} file${1 !== uniqueFiles.size ? "s" : ""}`), + 0 === data2.length + ? (this.summary.textContent = "Found 0 violations") + : (this.summary.textContent = `Found ${data2.length} violation${1 !== data2.length ? "s" : ""} across ${uniqueFiles.size} file${1 !== uniqueFiles.size ? "s" : ""}`), this.violationsTable.classList.toggle("hidden", 0 === data2.length); } updateBoxes(data2) { diff --git a/packages/code-analyzer-core/test/test-data/expectedOutputFiles/unexpectedEngineErrorViolation.goldfile.html b/packages/code-analyzer-core/test/test-data/expectedOutputFiles/unexpectedEngineErrorViolation.goldfile.html index 65382f28..2f828841 100644 --- a/packages/code-analyzer-core/test/test-data/expectedOutputFiles/unexpectedEngineErrorViolation.goldfile.html +++ b/packages/code-analyzer-core/test/test-data/expectedOutputFiles/unexpectedEngineErrorViolation.goldfile.html @@ -258,7 +258,9 @@ } updateSummary(data2) { const uniqueFiles = new Set(data2.map((v) => v.file)); - (this.summary.textContent = `Found ${data2.length} violation${1 !== data2.length ? "s" : ""} across ${uniqueFiles.size} file${1 !== uniqueFiles.size ? "s" : ""}`), + 0 === data2.length + ? (this.summary.textContent = "Found 0 violations") + : (this.summary.textContent = `Found ${data2.length} violation${1 !== data2.length ? "s" : ""} across ${uniqueFiles.size} file${1 !== uniqueFiles.size ? "s" : ""}`), this.violationsTable.classList.toggle("hidden", 0 === data2.length); } updateBoxes(data2) { diff --git a/packages/code-analyzer-core/test/test-data/expectedOutputFiles/zeroViolations.goldfile.html b/packages/code-analyzer-core/test/test-data/expectedOutputFiles/zeroViolations.goldfile.html index 7c962274..ecd188bd 100644 --- a/packages/code-analyzer-core/test/test-data/expectedOutputFiles/zeroViolations.goldfile.html +++ b/packages/code-analyzer-core/test/test-data/expectedOutputFiles/zeroViolations.goldfile.html @@ -258,7 +258,9 @@ } updateSummary(data2) { const uniqueFiles = new Set(data2.map((v) => v.file)); - (this.summary.textContent = `Found ${data2.length} violation${1 !== data2.length ? "s" : ""} across ${uniqueFiles.size} file${1 !== uniqueFiles.size ? "s" : ""}`), + 0 === data2.length + ? (this.summary.textContent = "Found 0 violations") + : (this.summary.textContent = `Found ${data2.length} violation${1 !== data2.length ? "s" : ""} across ${uniqueFiles.size} file${1 !== uniqueFiles.size ? "s" : ""}`), this.violationsTable.classList.toggle("hidden", 0 === data2.length); } updateBoxes(data2) {