Bug #53
[PHP PMD] specified rule-set can not be resolved
| Status: | New | Start: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
Description
Currently the phpmd that comes with the plug-in can not be executed. The reason is that location for the rule-sets can not be resolved. You will imagine why, if you look into the RuleSetFactory0[1]. If you install the PHPMD over PEAR the variable $_location will be replaced with the current PEAR repository path. In this case "/srv/pti/pear/svn/data". This means the factory has no chance to resolve the location. A posible solution/workaround is to fix the location after installing/updating the Package. The value has to be dirname(__FILE__) . '/../../data/PHP_PMD'
[0] http://github.com/manuelpichler/phpmd/blob/master/source/PHP/PMD/RuleSetFactory.php#L74
[1] http://github.com/manuelpichler/phpmd/blob/master/source/PHP/PMD/RuleSetFactory.php#L86
History
Updated by Dejan Spasic about 2 years ago
Hold on. I found a solution. :)
Looking deeper in the Factory i find out that is possbile to use fully qualified paths for each rule set. So everything is fine.