I have a Groovy project that's being analyzed by Sonar 3.0.1. We have duplicate code detection turned on, using the Sonar detector.
In one set of files, it's detecting 11 lines of duplicated import
statements. In another set of files, it's detecting 15 lines of duplicated member declarations. Since this project has a clear separation of database-vs-display objects (even though they're mostly similar, hence the duplicated member declarations), I'd like to configure Sonar to ignore these sets of duplications -- we consider them to be acceptable duplications.
How can I tell Sonar to ignore duplicated imports and/or member declarations, but still yell at me for duplicated code inside methods?