How can I analyze duplicates codes just at package level?

I am working on project migration with Java language (maven module project). And I use SonarQube to analyse my code. I created a new module in my parent projet I called it new-dao, in this module I put the new version of my new DAO methods, and in the end of the migration I will delete the old DAO module. Sometimes I use the same DAO, so I copy it without any change to my new-dao module, after that the sonar-scanner detects that code as a duplicated, it’s normal.

My question is, can I activate the analyse of duplication code juste at the level package and not all project, I means the analyse of duplication take juste the classes in the same package and scan them to get duplication just in this package ?

Hi,

What you’ve asked about isn’t doable. However, if what you’re after is to not see the old-to-new duplication reported, then you should be able to accomplish that by excluding oldDAO from duplication detection.

 
HTH,
Ann

1 Like

Thank you @ganncamp for your quick reply :slight_smile:
I will use your suggestion

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.