Closed vasilake-v closed 7 years ago
The project must be a Java project (i.e. have the Java nature). This is a leftover from when PMD was Java only. It's probably time to cut this dependency. You can try to add the Java nature to your project.
Just out of curiosity: does that rule work? PMD claims that it supports only CPD for PHP.
I guess you're right about PMD support for PHP.
I added Java nature to project. And tried to re-Apply PMD rules to project, but I got an exception saying:
Errors occurred during the build.
Errors running builder 'PMD Builder' on project 'mytestproject'.
java.lang.IllegalArgumentException: Language does not have a RuleChainVisitor: LanguageModule:PHP: Hypertext Preprocessor(PhpLanguageModule)
Judging by Laguage module source code net.sourceforge.pmd.lang.php.PhpLanguageModule
, I see that php language is defined, but has no RuleChainVisitor class (as error says ) compared to java language module.
That's unfortunate... I could've used the XPath rules to keep my code organized
Thanks for help
I can't enable and use PMD for my php project in Eclipse PDT.
Error StackTrace is attached.
My
ruleset.xml
file:Session Data