This issue was found as result of using the Sonar with maven-pmd-plugin. The maven-pmd-plugin issue, MPMD-174 - Using a permalink from sonar as a ruleset does not work, can be found here:
http://jira.codehaus.org/browse/MPMD-174
Basically, the logic (in public RuleSetReferenceId(final String id, final RuleSetReferenceId externalRuleSetReferenceId)) that determines whether the ID is a full ruleset name or not is flawed. If the given ID it is a HTTP(S) URL the stripping logic does not work correctly.
I don't know much about PMD so I don't know what is allowed and what is not, but two potential solutions could be:
I was okay with fixing this in maven-pmd-plugin, but the stakeholders there rather have it fixed in the PMD's code.
I've made the changes in my local fork as per solution #1. I can add a patch here or commit it on my fork. I just need to add a unit test for it.
Hi,
It would be great if you could create a pull request on github: https://github.com/pmd/pmd
Unfortunately I just released pmd 5.2.2 - so this bug needs to wait for 5.2.3.
Here is a commit on my fork:
https://sourceforge.net/u/msiemczyk/pmd/ci/929212cf96e83c0854b0317383013d6f5b406b23/
I think I figured it out. Here it is:
https://github.com/pmd/pmd/pull/45
Last edit: Maciek Siemczyk 2014-12-05
Hi Andreas,
Did I create the pull request correctly?
Regards,
Maciek
Yes, the pull request is fine. I'm working on it... Thanks!
Thanks again!