Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
javascript
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2014 at 17:37 UTC
Updated:
29 Jul 2014 at 23:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nod_Comment #2
tstoecklerYay, finally a JS patch that I can review :-)
Looks great.
Comment #3
nod_Reroll.
Comment #4
sunWah?
A space between the function name and its arguments/signature was only meant for anonymous functions?
That is, because for anonymous functions, there is no function name, so we only leave the regular/existing space after "function":
Adding a space after all function names would be a total alien to all programmers — I've never seen that style in any common programming language in my life, nor in any JavaScript code in the wild.
Comment #5
nod_I prefer the space because it's easier to pick up and read the function names when you're looking though a file. And to me function declarations are in the parts of code where we should be using proper typographic rules, just like in comments and variable declaration.
"would be a total alien to all programmers" Hyperbole much :p? I'm sure we all read books.
An I hate reading jQuery source code because they switched the spacing of parenthesis.
Comment #6
yesct commentedI think we need to get #1778828: [policy, no patch] Update JS coding standards marked fixed before continuing here. (OR we auto-format on the old standards and then do it again after agreement on new standards)
the suggestion to always have a space before the ( in a function declaration is illistruated in comment #7 in #1778828: [policy, no patch] Update JS coding standards.
Comment #7
droplet commentedNO Space ++.
Hoping it will not be another #2207647: [policy, no patch] Use layout- prefixes instead of l- in CSS Coding Standards.
Comment #8
nod_Fine. I don't really care about that space. The rest of the patch is more important to me.
Comment #9
nod_Things got resolved in the other issue (as far as what our JS syntax should be) so here is the patch.
For those wondering, function declaration is without space.
Comment #10
sunExcellent.
Comment #12
yesct commentedsuspicious fail.
and #2015849-16: Some standards fixes in entity_test.module and EntityApiTest.php, motivated by "DatabaseStorageController can't catch exceptions" just failed with that same test.
Drupal\simpletest\Tests\InstallationProfileModuleTestsTest 27 1 0
Message Group Filename Line Function Status
"SystemListingCompatibleTest test executed." found
on testbot 1848 (but the other issue had a different testbot)
Comment #13
sun9: core-js-auto-format-2212283-9.patch queued for re-testing.
Comment #15
yesct commented#2239969-20: Session of (UI) test runner leaks into web tests was reverted.
Comment #16
yesct commented9: core-js-auto-format-2212283-9.patch queued for re-testing.
Comment #17
nod_Green, back to rtbc
Comment #19
sunI played with the idea of re-rolling this, but this patch is auto-generated, right? @nod_?
(awesome, if that's the case)
Comment #20
nod_It sure is :D
Comment #21
sunComment #23
nod_20: core-js-auto-format-2212283-20.patch queued for re-testing.
Comment #24
sunComment #25
corbacho commentedThis patch also fixes this bug #2277671: Remove invisible character BM-M- from dialog.position.js
The patch applies nicely. Thumbs up
Comment #27
nod_reroll
Comment #28
nod_Comment #29
webchickReally sorry for the delay, folks. My post-DrupalCon life got a bit hectic.
Miraculously though, this still seemed to apply, so committed and pushed to 8.x. Woohoo! :)