Loading ...
Sorry, an error occurred while loading the content.

177[IMPLEMENTED] Re: The symbol XXX is declared but is apparently never used.

Expand Messages
  • Fred Lorrain
    Aug 18, 2008
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Fred Lorrain" <yahoo@...> wrote:
      >
      > --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@>
      > wrote:
      > >
      > > --- In jslint_com@yahoogroups.com, "Fred Lorrain" <yahoo@> wrote:
      > > >
      > > > Hello,
      > > >
      > > > JSLint generate an error if a symbol is not declared.
      > > > That's perfect!
      > > >
      > > > What about generating a warning if a symbol is declared but never
      > used?
      > > > A switch to turn off this option is welcome too.
      > > >
      > > > I'm using yuicompressor-2.3.5.jar to compress my scripts and
      this tool
      > > > typically generate such kind of message:
      > > >
      > > > [WARNING] The symbol myTH is declared but is apparently never used.
      > > > This code can probably be written in a more compact way.
      > > > ,myThead=null,myTfoot=null, ---> myTH <---
      > > > =null,myDiv=null;this.splitTable
      > >
      > > JSLint does identify unused variables in the function report. Is hat
      > > not enough?
      > >
      >
      > It's fine to have it in the report (I haven't seen it) but imagine I
      > have 100 methods in my object.
      > For every unused symbol I will have to track the method name and then
      > search for the symbol.
      >
      > If you can at least add the line number in the report it will really
      help.
      >


      In the new release of JSLint the symbol report has been improved to
      highlight unused symbols.
    • Show all 4 messages in this topic