*/
public void validate(final String data)
throws CssLintException {
final StopWatch watch = new StopWatch();
watch.start("init");
final RhinoScriptBuilder builder = initScriptBuilder();
watch.stop();
watch.start("cssLint");
LOG.debug("options: {}", this.options);
final String script = buildCssLintScript(WroUtil.toJSMultiLineString(data));
LOG.debug("script: {}", script);
builder.evaluate(script, "CSSLint.verify").toString();
final boolean valid = Boolean.parseBoolean(builder.evaluate("result.length == 0", "checkNoErrors").toString());
if (!valid) {
final String json = builder.addJSON().evaluate("JSON.stringify(result)", "CssLint messages").toString();
LOG.debug("json {}", json);
final Type type = new TypeToken<List<CssLintError>>() {}.getType();
final List<CssLintError> errors = new Gson().fromJson(json, type);
LOG.debug("Errors: {}", errors);
throw new CssLintException().setErrors(errors);