Disable Cross Module Duplicate Code detection

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    • Data Center Edition Version 7.9.1 (build 27448)
  • what are you trying to achieve
    • Disable duplicate code detection across multiple modules - we have a project with multiple sub projects / modules. Analysis is done at project level but want to avoid duplicate code detection across modules.
  • what have you tried so far to achieve this
    • Explicitly exclude certain files

We are using sonar scanner cli to perform analysis and publish analysis data to sonarqube
Is there a way to disable cross module duplicate detection?


I can’t think of any other way to exclude duplication other than exclude files, which you already tried.
SonarQube no longer has a concept of modules.