Reporter for jscpd. Generate a report in CodeClimate format for use in GitLab Code Quality Reports.
npm install jscpd-gitlab-reporterjscpd-gitlab-reporterA GitLab Code Quality reporter for jscpd.
This uses the custom tool approach
which is a subset of the Code Climate spec.
``bash`
npm install jscpd-gitlab-reporter
`bash`
jscpd [...options] --reporters gitlab /path/to/source
See the jspcd CLI docs for available options and configuration.
Add the following to your .gitlab-ci.yml
`yaml`
check:duplicates:
image: node:20.14.0-alpine3.20
stage: codequality
script:
- npm ci
- npx jscpd --reporters gitlab src/*/
artifacts:
reports:
codequality: report/gl-codequality.json
Predefined GitLab CI variable is used to determine
the relative file paths in the report. Defaults to the current working directory.
in the jscpd output directory, which itself
defaults to report/.$3
Merge the produced findings with an existing quality report if it already exists. Useful when utilising multiple tools
in the same GitLab job. Defaults to false`.---
MIT | Based on the @jscpd/serif-reporter by Andrey Kucherenko