|
| Support for highlighting breaches of coding standard | |
|
| | |
Joined: 22 Apr 2014 |
Posts: 22 |
|
|
|
Posted: Wed Aug 19, 2015 3:27 pm |
|
|
|
|
|
I know this thread is about three years old now and did not get any support from other members, but I recently started to (try to) follow the PSR-2 coding standard developed by the PHP Framework Interop Group. PSR-2 is the coding standard used by most the major PHP Framework and CMS including Zend Framework 2, Laravel, Symfony, CakePHP, Yii framework, Composer, Drupal, Doctrine, Joomla and many more. Even if I don't agree with all their choices, I'm trying to follow it so that my code can be easily shared with other users that follow this standard and I would love to see an implementation of a coding standard validator in PhpED. It would greatly help to train myself to use the standard and see where my mistakes are. I would see it as a button on the left side of the coding window, same as the word-wrap so it could be easily enable/disable per file.
Being able to define our own coding standard as requested by cemerson so long ago, would be nice but I think that a coding standard validator should be included in PhpED. Wordpress has its own coding standard. It could also be included so a user could chose his preferred coding standard when validating.
I don't think this feature should impose anything but it should let the user know that the standard is not respected if an error is detected.
Here is the link to the PSR-2 (http://) php-fig.org/psr/psr-2/
And the link to Wordpress coding standard (https://) make.wordpress.org/core/handbook/best-practices/coding-standards/php/
Please reply if you think that coding standard is important and if you would like to see a tool in PhpED to help you follow a standard
|
|
|
| | |
Joined: 02 Oct 2015 |
Posts: 2 |
|
|
|
Posted: Fri Oct 02, 2015 12:23 am |
|
|
|
|
|
infc wrote: | I know this thread is about three years old now and did not get any support from other members, but I recently started to (try to) follow the PSR-2 coding standard developed by the PHP Framework Interop Group. PSR-2 is the coding standard used by most the major PHP Framework and CMS including Zend Framework 2, Laravel, Symfony, CakePHP, Yii framework, Composer, Drupal, Doctrine, Joomla and many more. Even if I don't agree with all their choices, I'm trying to follow it so that my code can be easily shared with other users that follow this standard and I would love to see an implementation of a coding standard validator in PhpED. It would greatly help to train myself to use the standard and see where my mistakes are. I would see it as a button on the left side of the coding window, same as the word-wrap so it could be easily enable/disable per file.
Being able to define our own coding standard as requested by cemerson so long ago, would be nice but I think that a coding standard validator should be included in PhpED. Wordpress has its own coding standard. It could also be included so a user could chose his preferred coding standard when validating.
I don't think this feature should impose anything but it should let the user know that the standard is not respected if an error is detected.
Here is the link to the PSR-2 (http://) php-fig.org/psr/psr-2/
And the link to Wordpress coding standard (https://) make.wordpress.org/core/handbook/best-practices/coding-standards/php/
Please reply if you think that coding standard is important and if you would like to see a tool in PhpED to help you follow a standard |
It is very necessary!
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT - 5 Hours
Page 1 of 1
|
|
|
| |