Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To help you fight against duplication, Sonar SonarQubeTM embeds its own Copy Paste Detection engine (referred as Sonar CPD)engine. It can detect duplication between blocks:

...

When a change is needed on a piece of code, check for duplications with Sonarthrough the web interface. If there are duplicationsany:

  • Analyze those duplications
  • Try to remove this duplication by using inheritance or other suitable patterns (perform such action only if you have unit tests on the blocks to change)
  • Or do not forget to replicate your changes wherever it is necessary on the duplicated blocks

...

Note
titlesonar.branch

Note that cross project duplication detection is automatically disabled when analyzing a project with the 'sonar.branch' property set.

Related Topics

...