Hi guys,
is there any particular coding standard that I can check with CodeSniffer that I can follow if I want to contribute to the FuelPHP project?
Thanks!
Hi all,
maybe these sniffers could do the trick : https://github.com/eviweb/fuelphp-phpcs
All rules are not applicable, but the main are followed.
I let you test it if you want, and please feel free to give me your feedback.
Best regards
Eric
I saw the coding standards in the URL you sent Huzzi but they are not that detailed and I was wondering if the FuelPHP team uses a tool like PHP CodeSniffer to make sure that the standards are followed be contributions made. Joomla / Drupal are some projects that use CodeSniffer to keep a consistent code base, just wondering if there is something similar to FuelPHP.
No, we don't. Currently we scan contributions manually, so far that has not been an issue.
What exactly are you missing in the existing coding standards?
We use docblox to check if the high level comments are ok.
For inline comments, it's virtually impossible to automate that, a script can't tell you if they make any sense. We also need to scan the code manually to make sure the quality is up to par.
So for the moment I don't see the added benefit of an automated system.
Understand inline comments is fine, I was more thinking of the function comments. As a sample have a look at the Controller_Template->after() function , the response parameter is not documented. It just makes the code assist a bit trickier to understand in netbeans and also the automated doc generation to lack info. Haven't tried the docblox out, will have a look at it.
That what we use docblox for.
We're currently busy with a new application (called "Fuel Depot") which will contain all information about FuelPHP.
You can find the staging site here: http://fueldepot.exite.eu
If logged in, the API docs will show all docblox errors detected in the selected file, so it can be picked up and corrected. I'm also planning a central error log, which can be used as a docs-todo-list.