/**
* @return default {@link CompilerOptions} object to be used by compressor.
*/
protected CompilerOptions newCompilerOptions() {
final CompilerOptions options = new CompilerOptions();
/**
* According to John Lenz from the Closure Compiler project, if you are using the Compiler API directly, you should
* specify a CodingConvention. {@link http://code.google.com/p/wro4j/issues/detail?id=155}
*/
options.setCodingConvention(new ClosureCodingConvention());
// use the wro4j encoding by default
options.setOutputCharset(getEncoding());
// set it to warning, otherwise compiler will fail
options.setWarningLevel(DiagnosticGroups.CHECK_VARIABLES, CheckLevel.WARNING);
return options;
}