OLD | NEW |
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 "--jscomp_error=misplacedTypeAnnotation", | 81 "--jscomp_error=misplacedTypeAnnotation", |
82 "--jscomp_error=missingProperties", | 82 "--jscomp_error=missingProperties", |
83 "--jscomp_error=missingReturn", | 83 "--jscomp_error=missingReturn", |
84 "--jscomp_error=nonStandardJsDocs", | 84 "--jscomp_error=nonStandardJsDocs", |
85 "--jscomp_error=suspiciousCode", | 85 "--jscomp_error=suspiciousCode", |
86 "--jscomp_error=undefinedNames", | 86 "--jscomp_error=undefinedNames", |
87 "--jscomp_error=undefinedVars", | 87 "--jscomp_error=undefinedVars", |
88 "--jscomp_error=unknownDefines", | 88 "--jscomp_error=unknownDefines", |
89 "--jscomp_error=uselessCode", | 89 "--jscomp_error=uselessCode", |
90 "--jscomp_error=visibility", | 90 "--jscomp_error=visibility", |
| 91 # TODO(dbeam): happens when the same file is <include>d multiple times. |
| 92 "--jscomp_off=duplicate", |
91 ] | 93 ] |
92 | 94 |
93 _found_java = False | 95 _found_java = False |
94 | 96 |
95 _jar_command = [ | 97 _jar_command = [ |
96 "java", | 98 "java", |
97 "-jar", | 99 "-jar", |
98 "-Xms1024m", | 100 "-Xms1024m", |
99 "-server", | 101 "-server", |
100 "-XX:+TieredCompilation" | 102 "-XX:+TieredCompilation" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 210 |
209 output = self._format_errors(map(self._fix_up_error, errors)) | 211 output = self._format_errors(map(self._fix_up_error, errors)) |
210 if runner_cmd.returncode: | 212 if runner_cmd.returncode: |
211 self._fatal("Error in: " + file + ("\n" + output if output else "")) | 213 self._fatal("Error in: " + file + ("\n" + output if output else "")) |
212 elif output: | 214 elif output: |
213 self._debug("Output: " + output) | 215 self._debug("Output: " + output) |
214 | 216 |
215 self._clean_up() | 217 self._clean_up() |
216 | 218 |
217 return runner_cmd.returncode == 0 | 219 return runner_cmd.returncode == 0 |
OLD | NEW |