Skip to content

Commit

Permalink
refactor: remove unused input in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarvin8 committed Dec 19, 2024
1 parent 8f2f578 commit 89d562a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/helpers/transformTestCoverageReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,14 @@ export async function transformTestCoverageReport(
.map(([lineNumber]) => Number(lineNumber));

if (format === 'sonar') {
handleSonarFormat(relativeFilePath, lines, repoRoot, coverageObj as SonarCoverageObject);
handleSonarFormat(relativeFilePath, lines, coverageObj as SonarCoverageObject);
} else {
handleCoberturaFormat(
relativeFilePath,
formattedFileName,
lines,
uncoveredLines,
coveredLines,
repoRoot,
coverageObj as CoberturaCoverageObject,
packageObj!
);
Expand All @@ -111,12 +110,7 @@ export async function transformTestCoverageReport(
return { xml, warnings, filesProcessed };
}

function handleSonarFormat(
filePath: string,
lines: Record<string, number>,
repoRoot: string,
coverageObj: SonarCoverageObject
): void {
function handleSonarFormat(filePath: string, lines: Record<string, number>, coverageObj: SonarCoverageObject): void {
const fileObj: SonarClass = {
'@path': normalizePathToUnix(filePath),
lineToCover: [],
Expand All @@ -138,7 +132,6 @@ function handleCoberturaFormat(
lines: Record<string, number>,
uncoveredLines: number[],
coveredLines: number[],
repoRoot: string,
coverageObj: CoberturaCoverageObject,
packageObj: CoberturaPackage
): void {
Expand Down

0 comments on commit 89d562a

Please sign in to comment.