NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Support for highlighting breaches of coding standard


Joined: 11 Sep 2012
Posts: 17
Location: Nottingham, UK
Reply with quote
You should be able to define a coding standard (maybe using a config file or options dialogue), and then have the editor highlight breaches of this standard to you as an error or warning. For example, PSR-0, PSR-1 and PSR-2.
View user's profileFind all posts by cemersonSend private message


Joined: 22 Apr 2014
Posts: 22
Reply with quote
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
View user's profileFind all posts by infcSend private message


Joined: 02 Oct 2015
Posts: 2
Reply with quote
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!
View user's profileFind all posts by artourerSend private message
Support for highlighting breaches of coding standard
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  

  
  
 Reply to topic