0

I've been looking for hours how to disable sonarcloud checking on duplicate lines/blocks in my sonar-project.properties file, and I still can't make it, it's driving me crazy.

I've tried sonar.cpd.exclusions=**/*.js sonar.cpd.exclusions=**/*

But it's not working.

How to achieve this simple task ?

Thanks a lot for your help !

arnaudambro
  • 2,403
  • 3
  • 25
  • 51
  • Does this answer your question? [How do I ignore duplicated code report in Sonar?](https://stackoverflow.com/questions/52865737/how-do-i-ignore-duplicated-code-report-in-sonar) – hurricane Apr 08 '22 at 14:00
  • no it's not ! I don'tknow if it's because of JS but the `sonar.cpd.exclusions` is not working – arnaudambro Apr 08 '22 at 14:33

1 Answers1

0

On Sonarqube server, It is written in General Settings > Analysis Scope that

one asterisk * Matches zero or more characters and two asterisks ** matches one or more directories

since you need to exclude all files in the project from duplication detection, I think the below pattern will do the job

sonar.cpd.exclusions=**/**

Mai Elshiashi
  • 191
  • 2
  • 6