Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: third_party/closure_compiler/checker.py

Issue 418663002: Typecheck JS files for chrome://help before doing import transition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@json_to_pydict
Patch Set: Yet last fixes Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from collections import defaultdict 5 from collections import defaultdict
6 import os 6 import os
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 class Checker(object): 65 class Checker(object):
66 _common_closure_args = [ 66 _common_closure_args = [
67 "--accept_const_keyword", 67 "--accept_const_keyword",
68 "--language_in=ECMASCRIPT5", 68 "--language_in=ECMASCRIPT5",
69 "--summary_detail_level=3", 69 "--summary_detail_level=3",
70 "--warning_level=VERBOSE", 70 "--warning_level=VERBOSE",
71 "--jscomp_error=accessControls", 71 "--jscomp_error=accessControls",
72 "--jscomp_error=ambiguousFunctionDecl", 72 "--jscomp_error=ambiguousFunctionDecl",
73 "--jscomp_error=checkStructDictInheritance", 73 "--jscomp_error=checkStructDictInheritance",
74 "--jscomp_error=checkTypes", 74 # TODO(vitalyp): switch to jscomp_error after transition to new imports
Dan Beam 2014/08/06 16:06:59 do we still need this?
Vitaly Pavlenko 2014/08/07 18:18:13 I removed it in Patch Set #6.
75 "--jscomp_warning=checkTypes",
76 # "--jscomp_error=newCheckTypes",
75 "--jscomp_error=checkVars", 77 "--jscomp_error=checkVars",
76 "--jscomp_error=constantProperty", 78 "--jscomp_error=constantProperty",
77 "--jscomp_error=deprecated", 79 "--jscomp_error=deprecated",
78 "--jscomp_error=externsValidation", 80 "--jscomp_error=externsValidation",
79 "--jscomp_error=globalThis", 81 "--jscomp_error=globalThis",
80 "--jscomp_error=invalidCasts", 82 "--jscomp_error=invalidCasts",
81 "--jscomp_error=misplacedTypeAnnotation", 83 "--jscomp_error=misplacedTypeAnnotation",
82 "--jscomp_error=missingProperties", 84 # TODO(vitalyp): switch to jscomp_error after transition to new imports
85 "--jscomp_warning=missingProperties",
83 "--jscomp_error=missingReturn", 86 "--jscomp_error=missingReturn",
84 "--jscomp_error=nonStandardJsDocs", 87 "--jscomp_error=nonStandardJsDocs",
85 "--jscomp_error=suspiciousCode", 88 "--jscomp_error=suspiciousCode",
86 "--jscomp_error=undefinedNames", 89 "--jscomp_error=undefinedNames",
87 "--jscomp_error=undefinedVars", 90 "--jscomp_error=undefinedVars",
88 "--jscomp_error=unknownDefines", 91 "--jscomp_error=unknownDefines",
89 "--jscomp_error=uselessCode", 92 "--jscomp_error=uselessCode",
90 "--jscomp_error=visibility", 93 "--jscomp_error=visibility",
91 # TODO(dbeam): happens when the same file is <include>d multiple times. 94 # TODO(dbeam): happens when the same file is <include>d multiple times.
92 "--jscomp_off=duplicate", 95 "--jscomp_off=duplicate",
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 213
211 output = self._format_errors(map(self._fix_up_error, errors)) 214 output = self._format_errors(map(self._fix_up_error, errors))
212 if runner_cmd.returncode: 215 if runner_cmd.returncode:
213 self._fatal("Error in: " + file + ("\n" + output if output else "")) 216 self._fatal("Error in: " + file + ("\n" + output if output else ""))
214 elif output: 217 elif output:
215 self._debug("Output: " + output) 218 self._debug("Output: " + output)
216 219
217 self._clean_up() 220 self._clean_up()
218 221
219 return runner_cmd.returncode == 0 222 return runner_cmd.returncode == 0
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698