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 234174 - formating anonymous functions in javascript
Summary: formating anonymous functions in javascript
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0
Hardware: PC Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-09 09:50 UTC by bfanger
Modified: 2014-07-22 02:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bfanger 2013-08-09 09:50:52 UTC
In NetBeans Dev 201308072300 formatting for anonymous functions was changed (accidentally?)

Previous default:
var callback = function (event) {
function namedFunc(param1) {

Current default:
var callback = function(event) {
function namedFunc(param1) {

Current when i changed the formatting options:
var callback = function (event) {
function namedFunc (param1) {

I like to be able to recreate the previous default behavior.
Perhaps a additional formatting setting for anonymous function declarations?
Comment 1 bfanger 2014-03-17 17:09:13 UTC
Formatting is incompatible with JSLint.

Expected exactly one space between 'function' and '('.

or 

Unexpected space between '$methodname' and '('.

When `Editor>Formatting>Javascript>Spaces>Before Parentheses>Function Declaration` is checked
Comment 2 Petr Hejl 2014-07-18 15:09:37 UTC
Fixed in web-main c8e344de7f57. Introduced new option for anonymous functions.
Comment 3 Quality Engineering 2014-07-22 02:32:20 UTC
Integrated into 'main-silver', will be available in build *201407220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c8e344de7f57
User: Petr Hejl <phejl@netbeans.org>
Log: #234174 - formating anonymous functions in javascript