Java Code Examples for com.google.javascript.jscomp.CheckLevel#OFF

The following examples show how to use com.google.javascript.jscomp.CheckLevel#OFF . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SecureCompiler.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns compiler options which are safe for compilation of a cajoled
 * module. The set of options is similar to the one which is used by
 * CompilationLevel in simple mode. The main difference is that variable
 * renaming and closurePass options are turned off.
 */
private CompilerOptions getSecureCompilerOptions() {
  CompilerOptions options = new CompilerOptions();

  options.variableRenaming = VariableRenamingPolicy.OFF;
  options.setInlineVariables(Reach.LOCAL_ONLY);
  options.inlineLocalFunctions = true;
  options.checkGlobalThisLevel = CheckLevel.OFF;
  options.coalesceVariableNames = true;
  options.deadAssignmentElimination = true;
  options.collapseVariableDeclarations = true;
  options.convertToDottedProperties = true;
  options.labelRenaming = true;
  options.removeDeadCode = true;
  options.optimizeArgumentsArray = true;
  options.removeUnusedVars = false;
  options.removeUnusedLocalVars = true;

  return options;
}
 
Example 2
Source File: Closure_11_TypeCheck_s.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 3
Source File: CheckDebuggerStatementTest.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
public void testNoWarningWhenExplicitlyDisabled() {
  checkLevel = CheckLevel.OFF;

  testSame("debugger;");
  testSame("function foo() { debugger; }");
}
 
Example 4
Source File: TypeCheck.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 5
Source File: Closure_2_TypeCheck_t.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 6
Source File: Closure_2_TypeCheck_s.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 7
Source File: Closure_96_TypeCheck_s.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 8
Source File: Closure_96_TypeCheck_t.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 9
Source File: Closure_11_TypeCheck_t.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 10
Source File: Nopol2017_0051_s.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 11
Source File: Closure_66_TypeCheck_t.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 12
Source File: Closure_66_TypeCheck_s.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 13
Source File: Closure_69_TypeCheck_t.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 14
Source File: Closure_69_TypeCheck_s.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 15
Source File: Nopol2017_0029_s.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 16
Source File: Nopol2017_0029_t.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}
 
Example 17
Source File: Nopol2017_0051_t.java    From coming with MIT License 4 votes vote down vote up
TypeCheck(AbstractCompiler compiler,
    ReverseAbstractInterpreter reverseInterpreter,
    JSTypeRegistry typeRegistry) {
  this(compiler, reverseInterpreter, typeRegistry, null, null,
       CheckLevel.WARNING, CheckLevel.OFF);
}