Duplicate Code Threshold

Hi,

we are currently reworking our code base to address the duplication issues SonarCloud finds - I wonder if there is a way for us to define a lower threshold (like at least 50 lines) before a file gets reported.

Best regards
Norbert

Hi @norberthm,

Unfortunately, there is currently no way to customize the behavior of duplication detection.

Best,
Marcin

1 Like

Hi @Marcin_Majewski

ok, cool - Can you point me to a place where I can find out how duplicate detection currently works?

Best regards
Norbert

Hey @norberth,

Forgot to mention, but there is an option to ignore specific files from duplication, I am not sure if this would help you, but you can find more information here: https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/#ignore-duplications

The details about duplication can be found here: https://sonarcloud.io/documentation/user-guide/metric-definitions/#duplications

Best,
Marcin