Skip to content

Commit

Permalink
Implement a suggested fix to canonicalize (i.e., merge and sort) Clos…
Browse files Browse the repository at this point in the history
…ure imports (i.e., goog.require, goog.requireType and goog.forwardDeclare) according to the style guide.

The bulk of the logic is in a new RequiresFixer class, which is intended to be reused in CheckRequiresAndProvidesSorted to determine whether a fix is required using the same logic. This will be done in a followup refactor.

As a result, CheckRequiresAndProvidesSorted and ErrorToFixMapper currently disagree on whether a fix is necessary, which requires some tests to be checked in disabled. However, they have been observed to pass in the fully refactored version.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=235972853
  • Loading branch information
tjgq authored and brad4d committed Feb 27, 2019
1 parent ed691df commit b66f67b
Show file tree
Hide file tree
Showing 3 changed files with 821 additions and 345 deletions.

0 comments on commit b66f67b

Please sign in to comment.