PDT doesn't have it but Zend Studio for Eclipse has a php formatter with profile import/export capability and all the customization options I can think of. It works very well. I've been using it not just to keep my code in check but also in order to read code by others. Just open the file, hit ctrl+shift+F, and it formats the code based on the currently selected profile. There's also http://pear.php.net/package/PHP_CodeSniffer which runs from the cli and reports on code that violates some defined standards. Cheers, Fanis On Mon, Mar 23, 2009 at 12:31, Dipen <dipench@gmail.com> wrote:
Thanks for that, but I want it for code readability where in I can set things like "eclipse should show a warning if I am using camelcase for variables", "If there are more than 100 characters in 1 line of code then it should present a warning and auto formatter should fold it two lines" the way checkstyle plugin works for java (give proper checkstyle.xml). Syntax errors are automatically identified by PDT, I'll look into -l as to what all features does it provide. But I want something embedded into my IDE which prompts me of style errors and coding standard errors as I make them. Thanks again
On Mon, Mar 23, 2009 at 3:41 PM, Victor Kane <victorkane@gmail.com> wrote:
PHP does have its own built in "lint" (like the one we used to use every day with C programs).
$ php -l my.module No syntax errors detected in lcph.module
See http://www.snakelegs.org/2006/05/18/lint-php/ for article.
Victor Kane http://awebfactory.com.ar http://projectflowandtracker.com
On Mon, Mar 23, 2009 at 7:02 AM, Dipen <dipench@gmail.com> wrote:
Hi list,
After searching google for 1 hr I am still unable to find an equivalent for java checkstyle for PHP which would play nice with eclipse. I could find this http://developer.spikesource.com/wiki/index.php?title=Projects:phpcheckstyle... and one abandoned project with no releases on sourceforge. Does anyone know of checkstyle eclipse plugin for PHP (doesnt need to be all featureful). Also how do you manage this kind of task? Checkstyle eclipse plugin for java - http://eclipse-cs.sourceforge.net/ Thanks Dipen