- Within a source file
- Across multiple files in a project
- Across modules of a project
- Across multiple projects
Looking For Duplications
Add the Duplications widget (was Comments & Duplications prior to version 3.7) to your dashboard:
To visualize the entire block of code, click on the Expand link.
Activating Cross Module and Cross Project Duplication Detection
Log By default, the scope of duplication detection is the project for standard projects and the module for multi-module projects. To detect duplications between the modules of your project and between the different projects analyzed on your SonarQube platform, log in as a a System administrator, go to Settings > General Settings > General > Duplications and set the Cross project duplication detection property to true.Run a new Then run another analysis on your projects to detect duplications with other projects.
- For technical reasons, cross module duplications will be be detected only after the second analysis of your project.
- Cross project duplication detection is automatically disabled when analyzing a project with the
- Always check for duplications in a file before modifying it. If there are any: