Skip to content

Commit

Permalink
style: πŸ’„ Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanderleek committed Dec 23, 2024
1 parent 7c73ed6 commit d49c4cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
11 changes: 6 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52486,7 +52486,7 @@ var require_version = __commonJS({
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.version = void 0;
exports2.version = {
"revision": "7fea995",
"revision": "61e09ec",
"year": "2024"
};
}
Expand Down Expand Up @@ -52572,19 +52572,20 @@ var utils_1 = require_utils7();
var version_1 = require_version();
var signale_1 = __importStar(require_signale2());
signale_1.default.config({
displayFilename: true,
displayTimestamp: true
});
function generateMarkdownReport(clBinary) {
return __awaiter(this, void 0, void 0, function* () {
const totalsMarkdown = yield (0, exec_1.getExecOutput)(clBinary, ["report", "--format", "markdown"]);
const unitsMarkdown = yield (0, exec_1.getExecOutput)(clBinary, ["findings", "--format", "markdown"]);
let result = "";
result += "## Codebase totals\n";
result += totalsMarkdown.stdout;
result += "## CodeLimit Report\n";
result += "\n";
result += "## Refactoring report\n";
result += totalsMarkdown.stdout;
result += "### Findings\n";
result += unitsMarkdown.stdout;
result += "\n";
result += "Generated by [CodeLimit](https://getcodelimit.github.io)\n";
return result;
});
}
Expand Down
9 changes: 5 additions & 4 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@ import {version} from "./version";
import signale, {error, info, success} from "signale";

signale.config({
displayFilename: true,
displayTimestamp: true
});

async function generateMarkdownReport(clBinary: string) {
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;
result += '## CodeLimit Report\n';
result += '\n';
result += '## Refactoring report\n';
result += totalsMarkdown.stdout;
result += '### Findings\n';
result += unitsMarkdown.stdout;
result += '\n';
result += 'Generated by [CodeLimit](https://getcodelimit.github.io)\n';
return result;
}

Expand Down

0 comments on commit d49c4cc

Please sign in to comment.