From 2ea8e0a2e65d1d1f73e96d5c2bf9733c27516b1a Mon Sep 17 00:00:00 2001 From: Rob van der Leek <5324924+robvanderleek@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:47:27 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/action.ts | 4 ++-- src/codelimit.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/action.ts b/src/action.ts index 0b653c6..fa55917 100644 --- a/src/action.ts +++ b/src/action.ts @@ -17,8 +17,8 @@ import {getChangedFiles} from "./utils"; import {version} from "./version"; async function generateMarkdownReport(clBinary: string) { - const totalsMarkdown = await getExecOutput(clBinary, ['report', '--totals', '--format', 'markdown']); - const unitsMarkdown = await getExecOutput(clBinary, ['report', '--full', '--format', 'markdown']); + const totalsMarkdown = await getExecOutput(clBinary, ['report', '--format', 'markdown']); + const unitsMarkdown = await getExecOutput(clBinary, ['findings', '--format', 'markdown']); let result = ''; result += '## Codebase totals\n'; result += totalsMarkdown.stdout; diff --git a/src/codelimit.ts b/src/codelimit.ts index 656b599..2445b02 100644 --- a/src/codelimit.ts +++ b/src/codelimit.ts @@ -65,7 +65,7 @@ export function makeStatusBadgeSvg(codebase: Codebase): string { if (profile[3] > 0) { return makeBadgeSvg('Needs refactoring', 'red'); } else { - const profile2Percentage = Math.floor((profile[2] / (profile[0] + profile[1] + profile[2])) * 100); + const profile2Percentage = Math.round((profile[2] / (profile[0] + profile[1] + profile[2])) * 100); const color = profile2Percentage > 20 ? 'orange' : 'brightgreen'; return makeBadgeSvg(`${100 - profile2Percentage}%`, color); }