コード例 #1
0
 public void handle(CompilerOptions compilerOptions) {
   compilerOptions.setCheckEventfulObjectDisposalPolicy(AGGRESSIVE);
   compilerOptions.assumeStrictThis();
   compilerOptions.setCheckMissingReturn(CheckLevel.ERROR);
   compilerOptions.setAggressiveVarCheck(CheckLevel.ERROR);
   compilerOptions.setCheckDeterminism(true);
   compilerOptions.setBrokenClosureRequiresLevel(CheckLevel.ERROR);
   compilerOptions.setCheckTypes(true);
   compilerOptions.setInferConst(true);
   CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(compilerOptions);
   CompilationLevel.ADVANCED_OPTIMIZATIONS.setTypeBasedOptimizationOptions(compilerOptions);
 }
コード例 #2
0
ファイル: RefactoringDriver.java プロジェクト: chone/plovr
  @VisibleForTesting
  static CompilerOptions getCompilerOptions() {
    CompilerOptions options = new CompilerOptions();

    DependencyOptions deps = new DependencyOptions();
    deps.setDependencySorting(true);
    options.setDependencyOptions(deps);

    options.setIdeMode(true);
    options.setCheckSuspiciousCode(true);
    options.setCheckSymbols(true);
    options.setCheckTypes(true);
    options.setClosurePass(true);
    options.setPreserveGoogRequires(true);

    options.setWarningLevel(DiagnosticGroups.MISSING_REQUIRE, CheckLevel.ERROR);

    return options;
  }
コード例 #3
0
 @Override
 void apply(CompilerOptions options, boolean value) {
   options.setCheckTypes(value);
 }