Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] 'Unused variable' warnings in JavaScript

I just released a change to HEAD [1] that shows warning markers for unused local variables.
For example, in a function like this:

   function bar() {
      var foo;
  }


You'll see an "Unused variable 'foo'" warning in the ruler.
Unfortunately JSLint does not mention what line the variable declaration was on, so the warnings instead appear on the enclosing function:



Try this out and let me know if you find it helpful/irritating/etc.

Mark


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=358268#c2

GIF image


Back to the top