0

I have developped a custom plugin for SonarQube (C#, Powerbuilder, etc)

The native CPD Sensor from SonarQube doesn't perform the "Cut and Paste Detection"

Is there a special configuration for this ?

Thanks

D Cruette
  • 31
  • 5

2 Answers2

1

You have to implement the CPDMapping extension point. This extension point should return a Tokenizer that for a given file will return a list of tokens used by CPD algorithm.

1

For my custom plugin, I've used NewCpdTokens. It's now the preferred solution since CpdMapping is deprecated since SonarQube version 5.5.

Jean-Pierre Matsumoto
  • 1,917
  • 1
  • 18
  • 26