github superlinter jscpd duplicates threshold set to 0%

154 views Asked by At

The github Super Linter jscpd check for duplicate lines has the threshold set to 0%. How do I change this?

ERROR: jscpd found too many duplicates (7.3%) over threshold (0%)
Error: ERROR: jscpd found too many duplicates (7.3%) over threshold (0%)
    at ThresholdReporter.report (/node_modules/@jscpd/finder/dist/reporters/threshold.js:12:19)
    at /node_modules/@jscpd/finder/dist/in-files-detector.js:82:26
    at Array.forEach (<anonymous>)
    at /node_modules/@jscpd/finder/dist/in-files-detector.js:81:28
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
1

There are 1 answers

0
Pavlo Bazilnskyy On

You can create a file .jscpd.json in the root of your repository as described at https://megalinter.io/latest/descriptors/copypaste_jscpd. Setting a positive threshold value for my repository helped me to pass linting.