aaschmid / gradle-cpd-plugin

Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Apache License 2.0
95 stars 12 forks source link

Generate two records #7

Closed ghost closed 9 years ago

ghost commented 9 years ago

As mentioned in #5, I would expect the plugin to generate two records: one for the main sources and one for the test sources. It should be possible to configure the source folders for both records (and the path to the test sources should behave as in #4).

aaschmid commented 9 years ago

Likely it is just a personal preference but I prefer having on CPD on the whole source of a project (even submodules) because if you have the some code in main and test I would like to have it reported ... What is your argument that you do not want that? (However, with that in mind #4 makes a lot more sense in generating the reports in a cpd sub-directory ...)

ghost commented 9 years ago

You are right. It can be seen as personal preference, but in my opinion one should always separate test and source folders, even in such a plugin. I am a little bit more interested in reports for the main source code.than in the reports for the test source code. I am usually working in continuous integration setups where I would aggregate these reports on demand.

aaschmid commented 9 years ago

HI @Nils-Ehmke, I am changing some parts of the plugin. After asking some colleagues, most of them would also prefer having one check for main and test sources. I am sorry, but this does not get fixed.