Skip to content

Commit 4d60e50

Browse files
Show both AVG and MAX CCN in results
1 parent 4810bc7 commit 4d60e50

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/lib/checkers/complexity.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ export async function checkComplexity(
278278
"The repository should be analyzed with Lizard to track cyclomatic complexity across supported languages.",
279279
status: "pass",
280280
message:
281-
`Lizard analysis executed successfully. AvgCCN ${averageCcn.toFixed(
281+
`Lizard analysis executed successfully. Avg CCN ${averageCcn.toFixed(
282282
2
283-
)} <= ${averageThresholdText} and MaxCCN ${maxCcn.toFixed(
283+
)} <= ${averageThresholdText} and Max CCN ${maxCcn.toFixed(
284284
2
285285
)} <= ${maxCcnThresholdText}.`,
286286
evidence: [
@@ -313,7 +313,9 @@ export async function checkComplexity(
313313
"The repository should be analyzed with Lizard to track cyclomatic complexity across supported languages.",
314314
status: "fail",
315315
message:
316-
`Lizard analysis ran. Threshold exceeded: ${exceeded.join("; ")}.`,
316+
`Lizard analysis ran. Avg CCN ${averageCcn.toFixed(2)} (threshold: ${averageThresholdText}); ` +
317+
`Max CCN ${maxCcn.toFixed(2)} (threshold: ${maxCcnThresholdText}). ` +
318+
`Threshold exceeded: ${exceeded.join("; ")}.`,
317319
evidence: [
318320
`Analyzer: ${lizard.command} ${lizard.argsPrefix.join(" ")}`.trim(),
319321
...(analysis.code !== 0

0 commit comments

Comments
 (0)