Class CssLintProcessor
java.lang.Object
ro.isdc.wro.extensions.processor.css.CssLintProcessor
- All Implemented Interfaces:
Destroyable,ResourcePostProcessor,ResourcePreProcessor
@SupportedResourceType(CSS)
public class CssLintProcessor
extends Object
implements ResourcePreProcessor, ResourcePostProcessor, Destroyable
Processor which analyze the css code and warns you found problems. The processing result won't change no matter if the processed script
contains errors or not. The underlying implementation uses CSSLint script utility
https://github.com/stubbornella/csslint.
- Since:
- 1.3.8
- Author:
- Alex Objelean
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringvoiddestroy()protected CssLintprotected voidonCssLintException(CssLintException e, Resource resource) Called whenCssLintExceptionis thrown.protected voidInvoked when an unexpected exception occurred during processing.voidvoidsetOptionsAsString(String options)
-
Field Details
-
ALIAS
- See Also:
-
-
Constructor Details
-
CssLintProcessor
public CssLintProcessor()
-
-
Method Details
-
process
- Specified by:
processin interfaceResourcePreProcessor- Throws:
IOException
-
onException
Invoked when an unexpected exception occurred during processing. By default the exception is thrown further. -
newCssLint
- Returns:
CssLintinstance.
-
process
- Specified by:
processin interfaceResourcePostProcessor- Throws:
IOException
-
onCssLintException
Called whenCssLintExceptionis thrown. Allows subclasses to re-throw this exception as aRuntimeExceptionor handle it differently.- Parameters:
e-CssLintExceptionwhich has occurred.resource- the processed resource which caused the exception.
-
setOptionsAsString
- Parameters:
options- a CSV representation of options.
-
createDefaultOptions
- Returns:
- default options to use for linting.
-
destroy
- Specified by:
destroyin interfaceDestroyable- Throws:
Exception
-