Skip to content

Commit

Permalink
fix: πŸ› Fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanderleek committed Dec 23, 2024
1 parent 1495afe commit 2ea8e0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/codelimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2ea8e0a

Please sign in to comment.