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 237470 - Formatting moves semicolon to a new line in for cycle declaration
Summary: Formatting moves semicolon to a new line in for cycle declaration
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.4
Hardware: PC Windows 8
: P4 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 237550 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-22 11:17 UTC by elennaro
Modified: 2015-09-09 11:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (100.93 KB, text/plain)
2013-10-22 11:17 UTC, elennaro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description elennaro 2013-10-22 11:17:43 UTC
Product Version = NetBeans IDE 7.4 (Build 201310111528)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.7.0_40
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.0-b56

example:
was:
    // Events:
    addEvent(popupwraper, 'keydown', keyClick);
    addEvent(document.regForm, 'submit', validateForm);
    var enters = document.querySelectorAll('.enter');
    for (var i = 0, len = enters.length; i < len; ++i) {
        enters[i].onclick = enterPopup;
    };
After Alt+Shift+F:
    // Events:
    addEvent(popupwraper, 'keydown', keyClick);
    addEvent(document.regForm, 'submit', validateForm);
    var enters = document.querySelectorAll('.enter');
    for (var i = 0, len = enters.length; i < len; ++i) {
        enters[i].onclick = enterPopup;
    }
    ;
Comment 1 elennaro 2013-10-22 11:17:47 UTC
Created attachment 141403 [details]
IDE log
Comment 2 Vladimir Riha 2013-10-29 08:24:23 UTC
Reproducible. It is because the ; has no reason to be there. Although it is probably still valid code, JSlint also complains about it. I think this is more of a P4. Thank you for reporting
Comment 3 Marian Mirilovic 2013-10-29 09:42:23 UTC
*** Bug 237550 has been marked as a duplicate of this bug. ***