On Thu, Feb 21, 2008 at 5:30 PM, Cassie <[EMAIL PROTECTED]> wrote: > When running the shindig server these days we are now getting tons and > tons > of js warnings. It seems to be linting for some very weird things, the > most > prevalent being "Try to use a single 'var' statement per scope."
This is a legitimate problem, actually. "var" is not a free operation (see Doug Crockford's javascript language tech talk on google video for details) . Ideally a compressor or compiler should do this for you automatically and you wouldn't have to think about it. (dojo does, but YUI and jsmin do not). You're right that we should be able to disable it when it's getting in the way of other, more serious issues though. In this case it looks like the warning is actually coming from jslint though, not the compressor. I'm not familiar enough with the extension to know if we can disable individual jslint warnings (the jslint program DOES support this though, so I'd assume that you could...somehow). Full list of JSLint checks here: http://www.jslint.com/lint.html I haven't figured out a way to disable specific warnings yet, but Ideally I'd want to get away from using the yui compressor and use the codehaus javascript compressor -- unfortunately, codehaus only has this feature in their sandbox today and there's no way to automatically depend on it (you have to check out the source and do a mvn install). The codehaus tool is supposed to allow you to disable individual warnings. > > Does anyone know how to turn off this particular warning? I don't think it > is useful at all (using more than one var per scope in js is perfectly > reasonable) and is hiding some of the hopefully more valuable warnings. > > Thanks! > > - Cassie > -- ~Kevin If you received this email by mistake, please delete it, cancel your mail account, destroy your hard drive, silence any witnesses, and burn down the building that you're in.

