|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.happygiraffe.jslint.JSLint
public class JSLint
A utility class to check JavaScript source code for potential problems.
| Constructor Summary | |
|---|---|
JSLint()
Create a new JSLint object. |
|
| Method Summary | |
|---|---|
void |
addOption(Option o)
Add an option to change the behaviour of the lint. |
List<Issue> |
lint(String systemId,
Reader reader)
Check for problems in a Reader which contains JavaScript source. |
List<Issue> |
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 |
| Constructor Detail |
|---|
public JSLint()
throws IOException
JSLint object. This reads in the jslint JavaScript
source as a resource.
IOException - if something went wrong reading jslint.js.| Method Detail |
|---|
public void addOption(Option o)
o - Any Option.
public List<Issue> lint(String systemId,
Reader reader)
throws IOException
Reader which contains JavaScript source.
systemId - a filenamereader - a Reader over JavaScript source code.
List of Issues describing any problems.
IOException
public List<Issue> lint(String systemId,
String javaScript)
systemId - a filenamejavaScript - a String of JavaScript source code.
List of Issues describing any problems.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 | ||||||||