whitewashing.de

Netbeans PHP CodeSniffer Plugin: Now with Options Dialog

14. November 2009

Just two days before the International PHP Conference 09 will start I got an email from alexandrehaguiar that he forked my Netbeans PHP CodeSniffer plugin and added the long awaited Options screen. This is just awesome! This way I don't have to ask the Netbeans guys at IPC all the questions about how to implement it. I merged the changes back into my branch and released a new version which also fixed another small bug. For me it works with both Netbeans 6.7.1 and 6.8 Beta. I want to thank alexandre very much for this awesome contribution.

What you can do now is chose the Coding Standard you want to use in an Options Dialog under the "Miscallenous" button. You can choose from a list of pre-defined standards, or even enter your own if you use one. Additionally you can disable that warning are shown, so that with any given coding standard you only see the errors.

You can download the new version from the Github Project Downloads page.

:: Category: PHP, Comments (13)

Comments (13)

Keep the good work guys. It's nice to see that community is starting write plugins for php support in Netbeans. User: petr - Date: 2009/11/15 22:42
This is nice. How are you populating the dropdown list? I think you might not be using "phpcs -i" because the in-house Standard that we've installed isn't present in it, although it is listed when one does a "phpcs -i". User: ken guest - Date: 2009/11/17 11:41
Hi,

Actually the dropdown list is populate manualy but you can pass a custom standard if you want. This solution "phpcs -i" its possible but i think will need a new input in options to point the executable "phpcs" to make this solution OS independent. User: alexandre haguiar - Date: 2009/11/17 16:26
Hi,

Actually the dropdown list is populate manualy but you can pass a custom standard if you want. This solution "phpcs -i" its possible but i think will need a new input in options to point the executable "phpcs" to make this solution OS independent. User: alexandre haguiar - Date: 2009/11/17 16:26
Hi,

I've installed pear code sniffer and plugin, but "Show Code Standard Violations" is grayed out.
Can anyone explain how to install hole thing and what is required?

Thanks User: pettrinetz - Date: 2009/11/19 21:40
You must install PHP_CodeSniffer.

pear install PHP_CodeSniffer-1.2.1

http://pear.php.net/package/PHP_CodeSniffer/download User: b_aaa_b - Date: 2009/11/28 11:11
As I said, I've installed pear install PHP_CodeSniffer-1.2.1 and it doesn't work User: pettrinetz - Date: 2009/11/29 11:13
Same problem here.
OSX 10.6 installed PHP_Codesniffer trough PEAR.
Installed NB plugin.
I see the option, but it's grayed out.....
User: mwesten - Date: 2009/12/10 00:33
I'm using NetBeans 6.8 RC2 User: mwesten - Date: 2009/12/10 00:42
Hi, first thanks for your work.
I'm having a problem with the plugin.
I installed the PEAR plugin and the Netbeans plugin but when i click in " Code Standard Violations" netbeans throws an exception.
I have this problem in both 6.7.1 and 6.8.
Thanks again! User: fedegar33 - Date: 2009/12/13 23:36
@mwesten @fedegar33 @pettrinetz

There does seem to be some problems with the Java version of the plugin. I used Java 1.6, which apparrently you shouldnt when building a plugin for Netbeans. I got quite a huge patch by Petr Pisl, which he hacked for meon IPC 09 this year, which should solve most issues. However since then I havent been able to compile the thing and repackage it. Please bear with me, a new version will be released sometime soon! User: beberlei - Date: 2009/12/14 10:55
Whenever I try to run it I just get the exception:
java.io.IOException: CreateProcess: C:xamppphpphpcs --standard=Zend --report=xml application_top.php error=193

If I try the command from command line it runs, except it cant find the file since the full path isn't used.

Netbeans 6.8 on Windows User: phil - Date: 2010/02/01 19:18
Hi Beberlei's,

I developed its own pattern, so wish I could insert it in the drop-down list of standards. This would be possible?

Hug and congratulations for the work User: fernanda - Date: 2010/02/04 18:09

Post A Comment

 
 
 
 
::Back To The Top