Voting starts in March for the Drupal Association Board election.
I was looking for a solution to validate my code against the Drupal coding standards.
Finally I found this Eclipse project PHP Tool Integration (PTI)
It integrates different php tools into Eclipse - for my goal especially the PHP_CodeSniffer integration as an Eclipse validator is essential.
PHP_CodeSniffer provides a framework to test code against a coding standard.
There's also already a project drupal-sniff-standard that has started to port the PEAR coding standards to a Drupal specific version.
Unfortunately the project looks not really alive, and it covers not all the standards yet.
My own port based on the PEAR coding standards covers more cases but I'll try to contribute to the other project.
Now, what this post is really about :)
I would like to see a tools topic in the Coding Standards documentation.
A description of the coding standard is nice, but it's great to have tools.
I know there's already the coder module - but in my opinion it can't beat an IDE integration.
So let's bring all the information together, try to optimize the current solution and create a documentation page.
Current Tools / Projects:
- Plugin PHP Tool Integration (PTI) integrates PEAR into Eclipse
- PHP_CodeSniffer part of PTI - integrated as Eclipse validator
- drupal-sniff-standard initial port of the PEAR coding standard Sniffs
Projects to consider:
If someone wants to try my Drupal port of the PEAR sniffs for PHP_CodeSniffer please write me a mail.
There are still several issues (elseif, else, doxygen comments) but it's already a handy tool.
There's now a full project for this validator: