Yogesh
Yogesh

Reputation: 363

Using NetBeans IDE 7.1 +PHPMD+CodeSniffer

I am facing some problem while using PHPMD, CodeSniffer tools with NetBeans 7.1.

After configuration when I run these tools on my code base I am getting some errors under "Mess Detector" and "Code Sniffer" that I completely don't understand.

>>Configuration exception, check settings! See IDE log(org.jmgl.php.codesniffer.BatchInterface) org.xml.sax.SAXParseException

>>>>Configuration exception, check settings! See IDE log(org.jmgl.php.messdetecor.BatchInterface) org.xml.sax.SAXParseException

Are above lines indicating me to correct my IDE configuration?

Please help.

Upvotes: 0

Views: 2441

Answers (2)

Mantas
Mantas

Reputation: 56

I had the same problem. Make sure timezone is set correctly in php.ini If not, XML will contain Warning from PHP which makes that XML invalid.

Upvotes: 0

abi
abi

Reputation: 81

Worked for me:

Tools --> Options --> PHP --> phpCodeSniffer

At the bottom there is a button reset cached data. Hit the button, change your file, save it, everything should work now!

If it does not work:

Before I did reset the cached data i found this in NetBeans IDE-LOG:

INFO [org.jmgl.php.SettingsResolver]: No own configuration found under X:/xxx/nbproject/codesniffer.properties .

Those configuration-files are only loaded when there are some default values missing. So it might help to set some default-values (sniffs, tabsize) in Tools --> Options --> PHP --> phpCodeSniffer.

Upvotes: 2

Related Questions