Constructor and Description |
---|
JSLintBuilder() |
Modifier and Type | Method and Description |
---|---|
JSLint |
fromClasspathResource(String resource)
Initialize the scope from a jslint.js found in the classpath.
|
JSLint |
fromClasspathResource(String resource,
Charset encoding)
Initialize the scope from a jslint.js found in the classpath.
|
JSLint |
fromDefault()
Initialize the scope with a default jslint.js.
|
JSLint |
fromFile(File f)
Initialize the scope with the jslint.js passed in on the filesystem.
|
JSLint |
fromFile(File f,
Charset encoding)
Initialize the scope with the jslint.js passed in on the filesystem.
|
JSLint |
fromReader(Reader reader,
String name)
Initialize the scope with an arbitrary jslint.
|
JSLintBuilder |
timeout(long maxTimeInSeconds)
Set this JSLint instance to time out after maxTimeInSeconds.
|
JSLintBuilder |
timeout(long maxTime,
TimeUnit timeUnit)
Set this JSLint instance to timeout after maxTime.
|
public JSLint fromClasspathResource(String resource) throws IOException
resource
- the location of jslint.js on the classpath.JSLint
IOException
- if there are any problems reading the resource.public JSLint fromClasspathResource(String resource, Charset encoding) throws IOException
resource
- the location of jslint.js on the classpath.encoding
- the encoding of the resource.JSLint
IOException
- if there are any problems reading the resource.public JSLint fromDefault()
JSLint
RuntimeException
- if we fail to load the default jslint.js.public JSLint fromFile(File f) throws IOException
f
- the path to jslint.jsJSLint
IOException
- if the file can't be read.public JSLint fromFile(File f, Charset encoding) throws IOException
f
- the path to jslint.jsencoding
- the encoding of the fileJSLint
IOException
- if the file can't be read.@NeedsContext public JSLint fromReader(Reader reader, String name) throws IOException
reader
- an input source providing jslint.js.name
- the name of the resource backed by the readerJSLint
IOException
- if there are any problems reading from reader
.public JSLintBuilder timeout(long maxTimeInSeconds)
maxTimeInSeconds
- maximum execution time in seconds.public JSLintBuilder timeout(long maxTime, TimeUnit timeUnit)
maxTime
- The maximum execution time.timeUnit
- The unit of maxTime.Copyright © 2007-2013. All Rights Reserved.