Code duplication exclusion list not working

  • ALM used: Bitbucket Cloud
  • CI system used: AWS CodeBuild
  • Scanner command used when applicable:
- sonar-scanner 
  • Languages of the repository: javascript
  • Steps to reproduce: Sonar scans run on each PR build, so I get my PR report. However, the files stated in sonar.cpd.exclusions are still getting counted for duplication blocks, and are increasing my duplication percentage.
  • Potential workaround: I do not see a workaround, I just want the specified directories not taken into count when measuring code duplications.

Hey there.

Relative paths cannot be used in sonar.exclusions, sonar.cpd.exclusions, or sonar.coverage.exclusions. Take a look at the example glob patterns here.

You probably want an exclusion closer to:


1 Like

This worked. Thanks for the assistance!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.