Open GoogleCodeExporter opened 8 years ago
I think this issue is outside of the program scope of script-cover. There are
programs online (and offline) that check your code for coding style issues for
you, these are generally called "lints". Please check out
http://closure-compiler.appspot.com, http://jshint.com, http://jslint.com.
Closure Compiler: This probably has the least strict syntax parser. If your
code doesn't use reserved keywords and is valid, it will work and return no
errors, otherwise it will do its best to parse through the errors (it may even
be overzealous). I don't like that the output uses automatic semicolon
insertion (ASI) as part of its minifcation scheme, even with whitespace +
prettyprint mode, but as an error checker it's fine.
JSHint: A less strict version of JSLint. Basically if you can get JSHint to
reach the end of your code without an error stop, your code is syntactically
valid. The warnings are just that: warnings on code style. I think the parser
in this program is better than JSLint's because it doesn't hang on valid
syntax, but it still has the issue of an arbitrarily low limit. As a JS program
it is available offline with shell integration, most IDE's should have
integration with this, so look for plugins. This is probably the best option.
If there are too many errors, raise the limit with this comment at the start of
your code: /*jshint maxerr:1000*/
JSLint: A very strict syntax checker. It has a tendency to throw errors on
valid syntax and ASI. As a JS program it is available offline with shell
integration, most IDE's should have integration with this, so look for plugins.
Original comment by plngp0ng...@gmail.com
on 22 Jul 2013 at 3:09
Original issue reported on code.google.com by
Radullus...@gmail.com
on 26 Jun 2013 at 1:49