PHP CodeSniffer for Netbeans v0.2

I finally found some time to spend some time on the PHP CodeSniffer for Netbeans plugin. Previously the plugin used an unnecessary API which restricted the use to Netbeans 6.7.0 only. This API was removed so that the plugin should now work with all Netbeans Versions >= 6.7.0.

Additionally when working the previous version would scan every PHP script on a file per file basis when the all projects or main projects filters were activated. This rendered made the plugin almost useless. In the current version scans of filters that contain more than one file are blocked. That means you will only see Coding Violations when you enable the “Current File” filter. Using any other filter will just do nothing and won’t put your Netbeans in permanent hibernation mode (aka useless mode).

There is also some preference “phpcs.codingStandard” using the `NbPreferences API <>`_ which allows to configure the coding standard. [STRIKEOUT:However this feature was contributed by Manuel Pichler and I don’t yet understand how I can manipulate it. Maybe someone knows how (*Looking in Mapis general direction*)?] By default the Zend Coding Standard is used.

Update: Coding Standard can be changed by hacking into the config file .netbeans/6.7/config/ setting “phpcs.CodingStandard=”. Additionally I fixed several bugs with the inline highlighting that did not refresh when lines in the file changed.

More about: Netbeans

Sign up for my newsletter to get notified when I post new content on this blog and with the occasional exclusive content only for subscribers.

By clicking on the Subscribe button I am giving my consent for Benjamin Eberlei to hold my name and email address for the purposes of contacting me with a newsletter on the topics of this blog. You can unsubscribe with one click at any time and withdraw your consent. No spam. I will never share your e-mail address. Privacy Policy