This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 230740 - Add support for coding standard(s) to be respected by the Editor
Summary: Add support for coding standard(s) to be respected by the Editor
Status: REOPENED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-04 14:31 UTC by gena01
Modified: 2016-09-23 12:00 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gena01 2013-06-04 14:31:30 UTC
I would LOVE to see a way to select a coding standard and have the editor honor and follow it. Right now i have to go through a number of various dialogs/options and select the proper settings to match recommendations for the coding standard that i try to follow.

For example: I am trying to adapt PSR2 coding standard to the project(s) I am working on.
Comment 1 Tomas Mysik 2013-06-05 05:14:16 UTC
Can you be more specific please? Simply write how you think it should work, e.g. "In Project Properties there should be ... and if I do this or that then ...".

Simply reopen this issue, thanks.
Comment 2 gena01 2013-06-13 03:40:33 UTC
In Tools -> Options -> Editor -> Formatting when selecting "PHP" It should also have an option "Coding Standard". Possible starting options PSR1/PSR2.

http://www.php-fig.org/psr/1/
http://www.php-fig.org/psr/2/  

I am not sure at this time if that should be enforced and/or default or optional. One coding standard I would love to see/test is PSR2.

Once a coding standard is selected the editor changes whatever formatting options needs to be changed to follow the selected coding standard. 

This makes things much much easier to setup if you have a standard in mind.

Coding standard can also be specified/selected/enforced at the Project level as well, just like other editor options. There might be an import/export option as well as an ability to create a custom coding standard/convention. This would also tie really well into static code analysis which should follow/validate against the selected coding standard.
Comment 3 Tomas Mysik 2013-06-13 04:19:04 UTC
Thanks for the detailed explanation, reassigning to the proper component.