How can I define the number of token needed for duplicated code

Hello,

I am building a plugin for a language not supported by SonarQube (Robot Framework). By design this language doesn’t have a lot of tokens therefore, the rule 10 lines or 100 tokens needing to be the same to consider to blocks as duplicated doesn’t work in my case.

Is there a way to tune in this number in the SensorContext? Should I check somewhere else?

Thanks for your help!

Renaud

Hi,

Simply declare a property definition for the special properties:
sonar.cpd.<your language key>.minimumLines
sonar.cpd.<your language key>.minimumTokens
with the default value you like.

Thanks a lot Julien,

Exactly what I was looking for :slight_smile: