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

Side by Side Diff: build/android/gyp/javac.py

Issue 1286613002: Update errorprone to fix java 8 issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update DEPS and build files. Created 5 years, 4 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
« no previous file with comments | « DEPS ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import fnmatch 7 import fnmatch
8 import optparse 8 import optparse
9 import os 9 import os
10 import shutil 10 import shutil
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 elif error_re.match(line): 48 elif error_re.match(line):
49 line = Colorize(line, error_re, error_color) 49 line = Colorize(line, error_re, error_color)
50 elif marker_re.match(line): 50 elif marker_re.match(line):
51 line = Colorize(line, marker_re, marker_color) 51 line = Colorize(line, marker_re, marker_color)
52 return line 52 return line
53 53
54 return '\n'.join(map(ApplyColor, output.split('\n'))) 54 return '\n'.join(map(ApplyColor, output.split('\n')))
55 55
56 56
57 ERRORPRONE_OPTIONS = [ 57 ERRORPRONE_OPTIONS = [
58 '-Xepdisable:'
59 # Something in chrome_private_java makes this check crash. 58 # Something in chrome_private_java makes this check crash.
60 'com.google.errorprone.bugpatterns.ClassCanBeStatic,' 59 '-Xep:ClassCanBeStatic:WARN',
61 # These crash on lots of targets. 60 # These crash on lots of targets.
62 'com.google.errorprone.bugpatterns.WrongParameterPackage,' 61 '-Xep:ParameterPackage:OFF',
63 'com.google.errorprone.bugpatterns.GuiceOverridesGuiceInjectableMethod,' 62 '-Xep:OverridesGuiceInjectableMethod:OFF',
64 'com.google.errorprone.bugpatterns.GuiceOverridesJavaxInjectableMethod,' 63 '-Xep:OverridesJavaxInjectableMethod:OFF',
65 'com.google.errorprone.bugpatterns.ElementsCountedInLoop' 64 '-Xep:ElementsCountedInLoop:WARN',
65 # TODO(mikecase): Remove these flags once issues have been fixed. These
66 # errors are present and causing errorprone builds to fail early. Setting to
67 # warn so we can see more errors that occur later in the build.
Nico 2015/08/17 20:55:34 Builds should be silent, else people learn to tole
mikecase (-- gone --) 2015/08/19 23:29:29 Fixed. Have a few CLs to fix errors/warnings I go
68 '-Xep:DepAnn:WARN',
69 '-Xep:JUnit4TestNotRun:WARN',
70 '-Xep:NarrowingCompoundAssignment:WARN',
66 ] 71 ]
67 72
68 def DoJavac( 73 def DoJavac(
69 bootclasspath, classpath, classes_dir, chromium_code, 74 bootclasspath, classpath, classes_dir, chromium_code,
70 use_errorprone_path, java_files): 75 use_errorprone_path, java_files):
71 """Runs javac. 76 """Runs javac.
72 77
73 Builds |java_files| with the provided |classpath| and puts the generated 78 Builds |java_files| with the provided |classpath| and puts the generated
74 .class files into |classes_dir|. If |chromium_code| is true, extra lint 79 .class files into |classes_dir|. If |chromium_code| is true, extra lint
75 checking will be enabled. 80 checking will be enabled.
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 input_files + build_utils.GetPythonDependencies()) 317 input_files + build_utils.GetPythonDependencies())
313 318
314 if options.stamp: 319 if options.stamp:
315 build_utils.Touch(options.stamp) 320 build_utils.Touch(options.stamp)
316 321
317 322
318 if __name__ == '__main__': 323 if __name__ == '__main__':
319 sys.exit(main(sys.argv[1:])) 324 sys.exit(main(sys.argv[1:]))
320 325
321 326
OLDNEW
« no previous file with comments | « DEPS ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698