facebook

Javascript validation: Using ++ and — is considered harmful

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #294623 Reply

    I’ll just add my vote to remove that silly warning.

    ++ and — are common practice. Going through my code to replace all instances of i++ by i=i+1 is more likely to introduce bugs.

    I just reinstalled MyEclipse and had to figure where that setting has gone.
    In Eclipse 7 it is under Window > Preference > MyEclipse > Validation > Javascript.

    #296911 Reply

    This is the most ridiculous warning that I have seen in my 25+ years of enterprise level computing. Crocker I dare say is off his Rocker.

    #296927 Reply

    rmcvay
    Member

    Using ++ and — are potentially dangerous in the context of an expression but a stand alone variable increment or decrement shouldn’t be flagged as a problem.

    #298615 Reply

    gfaron
    Member

    This thread started in 2005 and in 2009 people are still asking for the default to be changed. Sigh. At any rate, the path tot he modification given earlier in the thread doesn’t seem to be valid anymore in MyEclipse 6.5. Can someone please point me to where to go to disable the warnings for ++ and –?

    #298627 Reply

    gfaron,
    You can disable this setting from
    windows > preferences > My Eclipse Workbench > Validation > JavaScript.
    Uncheck “++ and — considered harmful”

    #298843 Reply

    gfaron
    Member

    Actually, that path is invalid as well (at least under build 6.50.0 GA). I did however locate the checkbox under this path:
    Window >> Preferences… >> MyEclipse Enterprise Workbench >> Files and Editors >> JavaScript >> JavaScript Source

    The short path for finding this location was to simply right-click on the warning/error light in the folding column of the IDE and choose “Preferences…” from the context menu. Took me right to the same place…

Viewing 6 posts - 16 through 21 (of 21 total)
Reply To: Javascript validation: Using ++ and — is considered harmful

You must be logged in to post in the forum log in