- Posted by thomasw at 20:22:28 // //
Since the last few weeks I have been working hard on finishing a first draft of the ZF Coding Standard.
It’s almost finished and aims to force a equal codequality for the complete framework.
If you are interested you can already try it out.
* Download the actual trunk
* Install PHP_CodeSniffer from PEAR
* Look into Zend/incubator/tools/codingstandard for details
Actually it finds more than 160.000 errors, but you have to keep in mind that the coding standard I’ve created is really VERY strict.
It mocks about false whitespaces, about false parameter types, about missing brackets and much much more.
Until now I’ve adopted and created more than 80 different tests.
As the standard itself is for now not completly fixed and confirmed, this testbed is only a draft.
Feel free to give response to me over the I18N mailing list.
I18N Team Leader, Zend Framework
- Posted by thomasw at 12:12:18 // //
Actually there have been several discussions about API doc failures.
This was for me the reason to force the coding standard. I am actually working on a coding standard which does automatically check the whole framework and returns all failures which have been found.
By using CodeSniffer, which is a perfect tool for this purpose, and the existing coding standard which can be found on the ZF page, I already created several rules.
Running the test on the framework showed me that there is not really a coded standard… it’s more a “everyone does what he thinks to be the best” thing.
Until now there exist about 15 tests and I already found more than 70.000 failures and warnings.
But I must confess that I am pedantic on the rules.
For example: I integrated a test which looks if the indenting is 4 spaces or not… or if the keywords are written lowercase…
Details for this process can be found in these links:
http://framework.zend.com/wiki/display/ZFDEV/ZF Coding Standards (RC)
http://framework.zend.com/wiki/display/ZFDEV/PHP Coding Standard (draft)