Details
Description
reported by Carlos Gomez on Sonar dev ML
When you configure <sonar.phpcpd.excludes>tests</sonar.phpcpd.excludes> property. The plugin invokes:
[INFO] Executing phpcpd with command 'phpcpd --min-lines 3 --min-tokens 5 --log-pmd /var/develenv-1.0.1-SNAPSHOT/hudson/jobs/carlosg_ps-api-appstore/workspace/ps-api-appstore/target/logs/php-cpd.xml
--suffixes php,php3,php4,php5,phtml,inc --excludetests /var/develenv-1.0.1-SNAPSHOT/hudson/jobs/carlosg_ps-api-appstore/workspace/ps-api-appstore'
The referenced parameter '--excludetests/*/.php' is not registered.
LINE 85:
if (configuration.isStringPropertySet(PHPCPD_EXCLUDE_PACKAGE_KEY))
The solution is:
if (configuration.isStringPropertySet(PHPCPD_EXCLUDE_PACKAGE_KEY))
{ result.add(PHPCPD_EXCLUDE_OPTION); result.add(configuration.getExcludePackages()); }
Solved and unit test added