Hello,
i am currently working on a plugin that offers extended capabilities for duplications on Sonarqube 5.4.
This includes new metrics as graphs for which i need access to the real results of the CPD (duplication data).
I have tried three ways but miserably failed, mostly because of deprecations (and missing redirections to replacements) or missing documentation on the new modules.
First approach was to use the internally used PMD CPD by providing the wrapper and accessing the DUPLICATION_DATA metric later in a measure computer -> deprecated but no redirection to alternatives
As i did not find a way to overcome the problem and peeking at the next version of sonarqube revealed that PMD CPD will be deprecated, i decided to use an external tool to stay flexible and mostly independent of big API changes.
Therefore i tried to use the ReportPublisher to report the duplication's and to reuse everything else, nevertheless it cannot be injected (even though it has @BatchSide).
After that i found out the web service api offers access to the duplications which works obviously but can only be applied file-wise. Furthermore it has to happen in a measure computer to guarantee that the CPD run already (or can the order be defined?).
Is there no direct clean way to access the duplication data?
The preferred way would be an external CPD as CPD tools have great differences in their capabilities results and this would offer full control, but how can i report my results such that they are reused by the remainder?
Thanks,
Hannes