public class JSLint extends Object
Construction of JSLint| Modifier and Type | Method and Description |
|---|---|
void |
addOption(Option o)
Add an option to change the behaviour of the lint.
|
void |
addOption(Option o,
String arg)
Add an option to change the behaviour of the lint.
|
String |
getEdition()
Return the version of jslint in use.
|
JSLintResult |
lint(String systemId,
Reader reader)
Check for problems in a
Reader which contains JavaScript source. |
JSLintResult |
lint(String systemId,
String javaScript)
Check for problems in JavaScript source.
|
String |
report(String javaScript)
Report on what variables / functions are in use by this code.
|
String |
report(String javaScript,
boolean errorsOnly)
Report on what variables / functions are in use by this code.
|
void |
resetOptions()
Clear out all options that have been set with
addOption(Option). |
public void addOption(Option o)
o - Any Option.public void addOption(Option o, String arg)
OptionParser.o - Any Option.arg - The value to associate with o.public String getEdition()
public JSLintResult lint(String systemId, Reader reader) throws IOException
Reader which contains JavaScript source.systemId - a filenamereader - a Reader over JavaScript source code.JSLintResult.IOExceptionpublic JSLintResult lint(String systemId, String javaScript)
systemId - a filenamejavaScript - a String of JavaScript source code.JSLintResult.public String report(String javaScript)
javaScript - public String report(String javaScript, boolean errorsOnly)
javaScript - errorsOnly - If a report consisting solely of the problems is desired.public void resetOptions()
addOption(Option).Copyright © 2007-2013. All Rights Reserved.