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.
Summary: | Excessive empty lines added between docblock comments and function declaration when there is preceding inline comment | ||
---|---|---|---|
Product: | php | Reporter: | josef.sabl |
Component: | Formatting & Indentation | Assignee: | junichi11 |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | junichi11, tmysik |
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | My formatting settings. |
It's reproducible in 8.1, 8.2, dev. It seems that the cause is a comment part. I'll try looking at it. Thanks for reporting! I'll fix it. BTW, I found another issue (Reformat the below code). But probably, we can fix it and this issue at the same time. Code:======================================== <?php class MyClass { // comment public $foo; // comment // comment public $bar; /** * comment */ public function bar() { } } Actual:======================================== <?php class MyClass { // comment public $foo; // comment // comment public $bar; /** * comment */ public function bar() { } } Expected:======================================== <?php class MyClass { // comment public $foo; // comment // comment public $bar; /** * comment */ public function bar() { } } Formatting Options: - Blank Lines "Group Fields without PHP Doc" uncheck "Before Fields" 1 "Between Fields" 1 "After Fields" 1 Thanks. Fixed. http://hg.netbeans.org/web-main/rev/dc79aaf6d4fc Thanks. Integrated into 'main-silver', will be available in build *201611300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/dc79aaf6d4fc User: Junichi Yamamoto <junichi11@netbeans.org> Log: #268710 - Excessive empty lines added between docblock comments and function declaration when there is preceding inline comment |
Created attachment 162657 [details] My formatting settings. Expected autoformatting: class MyClass { public $foo; //this is foo /** * This is bar */ public function bar() { } } Actual autoformatting: class MyClass { public $foo; //this is foo /** * This is bar */ public function bar() { } } Sometimes there is one excessive line, sometime more. My formatting settings are attached.