Skip to content

Commit

Permalink
🐞 fix: cleanup jscpd report properly (#42)
Browse files Browse the repository at this point in the history
* 🐞 fix: cleanup jscpd report properly

* chore: build, dist updated
  • Loading branch information
maxisam committed Oct 5, 2023
1 parent 0ef66c1 commit 1cbb9f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/duplicated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ export async function duplicatedCheck(
const isOverThreshold = checkThreshold(jsonReport, options.threshold || 0);
jscpdCheckAsError && isOverThreshold ? setFailed('❌ DUPLICATED CODE FOUND') : warning('DUPLICATED CODE FOUND', ANNOTATION_OPTIONS);
showAnnotation(clones, cwd, jscpdCheckAsError && isOverThreshold);
await execute(`rm -rf ${cwd}/${REPORT_ARTIFACT_NAME}`);
setOutput('hasDuplicates', `${isOverThreshold}`);
} else {
setOutput('hasDuplicates', 'false');
notice('✅ NO DUPLICATED CODE FOUND', ANNOTATION_OPTIONS);
}
await execute(`rm -rf ${cwd}/${REPORT_ARTIFACT_NAME}`);
}

function getOptions(jscpdConfigPath: string, workspace: string, cwd: string): Partial<IOptions> {
Expand Down

0 comments on commit 1cbb9f4

Please sign in to comment.