Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor wording tweaks

...

Duplication is the worst quality flow flaw as it includes all the others. Indeed copy/pasting a block of code duplicates non respects : the disregard of coding standards, any potential bugs, etcand so on.

To help you fight against duplication, SonarQubeembeds SonarQube embeds its own Copy Paste Detection engine. It can detect duplication between blocks:

...

When a change is needed on a piece of code, first check for duplications through the web interface. If there are any:

  • Analyze those duplications Try to remove this duplication and eliminate them 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

Looking For

...

Duplications

Add the Comments & Duplications widget to your dashboard:

...