Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Stray commas

Orion's lack of project-level validation [1] makes it painful to find these errors. In the past I've had to open every .js file individually and scan for "Extra comma" messages from JSLint.

While we're on the topic of breaking the build: don't use "future reserved words" (char, extends, final, etc.) as variable or property names. JSLint doesn't warn about all of these (in particular 'char') but the closure compiler will still blow up on them.

Mark

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=368176

On Wed, Apr 11, 2012 at 11:14 AM, Anton McConville <Anton.McConville@xxxxxxxxxx> wrote:

Actually stray commas are disastrous for a web developer with browsers too! While FireFox is generous in tolerating them, IE or WebKit will consistently fail with them. They're not welcome at all, and typically any error presented will not immediately suggest a stray comma.

Anton


Inactive hide details for John Arthorne---04/11/2012 11:05:09 AM---One of the build problems last night was an an extra trailinJohn Arthorne---04/11/2012 11:05:09 AM---One of the build problems last night was an an extra trailing comma in an object literal. These are tolerated by browsers but a


    From:

John Arthorne/Ottawa/IBM@IBMCA

    To:

orion-dev@xxxxxxxxxxx

    Date:

04/11/2012 11:05 AM

    Subject:

[orion-dev] Stray commas




One of the build problems last night was an an extra trailing comma in an object literal. These are tolerated by browsers but are illegal and cause the closure compiler in our build to fail. This is just a reminder that we should all be using the Orion _javascript_ editor, which correctly reports trailing commas as illegal. Please don't commit any JS file that has errors showing in the Orion editor. These problems are trivial to catch at editing time but can be really difficult to track down in the build (Simon was tracking this down until 1am last night).

John
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev



_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev


GIF image

GIF image


Back to the top