Skip to content

Commit

Permalink
Report all warnings that can be auto-fixed, including lint warnings s…
Browse files Browse the repository at this point in the history
…o that the "fix compiler errors" refactoring will fix them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140785626
  • Loading branch information
tbreisacher authored and blickly committed Dec 2, 2016
1 parent ddc1059 commit cbf6153
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/com/google/javascript/refactoring/RefactoringDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private Compiler createCompiler(
@VisibleForTesting
public static CompilerOptions getCompilerOptions() {
CompilerOptions options = new CompilerOptions();
options.setLanguageIn(LanguageMode.ECMASCRIPT6);
options.setLanguageIn(LanguageMode.ECMASCRIPT_NEXT);
options.setLanguageOut(LanguageMode.ECMASCRIPT5);
options.setSummaryDetailLevel(0);

Expand All @@ -110,7 +110,9 @@ public static CompilerOptions getCompilerOptions() {
options.setGenerateExports(true);
options.setPreserveGoogProvidesAndRequires(true);

options.setWarningLevel(DiagnosticGroups.MISSING_REQUIRE, CheckLevel.ERROR);
options.setWarningLevel(DiagnosticGroups.STRICT_MISSING_REQUIRE, CheckLevel.WARNING);
options.setWarningLevel(DiagnosticGroups.EXTRA_REQUIRE, CheckLevel.WARNING);
options.setWarningLevel(DiagnosticGroups.LINT_CHECKS, CheckLevel.WARNING);

return options;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

goog.provide('refactoring_testcase');

/** @suppress {extraRequire} */
goog.require('test_dependency');

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ goog.provide('refactoring_testcase');

goog.require('goog.asserts');
goog.require('goog.dom.safe');
/** @suppress {extraRequire} */
goog.require('test_dependency');

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

goog.provide('refactoring_testcase');

/** @suppress {extraRequire} */
goog.require('test_dependency');

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
goog.provide('refactoring_testcase');

goog.require('goog.dom.safe');
/** @suppress {extraRequire} */
goog.require('test_dependency');

/**
Expand Down

0 comments on commit cbf6153

Please sign in to comment.