|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jslint4java.JSLint
public class JSLint
A utility class to check JavaScript source code for potential problems.
Construction of JSLint| Method Summary | |
|---|---|
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). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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.
IOException
public 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).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||