ro.isdc.wro.extensions.processor.support.linter
Class AbstractLinter
java.lang.Object
ro.isdc.wro.extensions.processor.support.linter.AbstractLinter
- Direct Known Subclasses:
- JsHint, JsLint
public abstract class AbstractLinter
- extends Object
Encapsulates common code for utilities like jsHint or jsLint.
- Since:
- 1.4.2
- Author:
- Alex Objelean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLinter
public AbstractLinter()
getScriptAsStream
protected abstract InputStream getScriptAsStream()
- Returns:
- the stream of the linter script. Override this method to provide a different script version.
validate
public void validate(String data)
throws LinterException
- Validates a js using jsHint and throws
LinterException
if the js is invalid. If no exception is thrown, the
js is valid.
- Parameters:
data
- js content to process.
- Throws:
LinterException
getLinterName
protected abstract String getLinterName()
- Returns:
- the name of the function used to perform the lint operation.
setOptions
public AbstractLinter setOptions(String... options)
- Parameters:
options
- the options to set
createDefaultOptions
protected String createDefaultOptions()
- Returns:
- default options to use for linting.
Copyright © 2008-2013. All Rights Reserved.