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

Unified Diff: tools/android/checkstyle/checkstyle.py

Issue 451313002: Add and start using Checkstyle 5.7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/checkstyle/sun_checks.xml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/checkstyle/checkstyle.py
diff --git a/tools/android/checkstyle/checkstyle.py b/tools/android/checkstyle/checkstyle.py
index c47fbee45c156703dbad8d41c4fff65fc16a5813..33cd33df27ac0f6ab3acc15e9b297135b689734f 100644
--- a/tools/android/checkstyle/checkstyle.py
+++ b/tools/android/checkstyle/checkstyle.py
@@ -24,7 +24,10 @@ def RunCheckstyle(input_api, output_api, style_file):
checkstyle_env = os.environ.copy()
checkstyle_env['JAVA_CMD'] = 'java'
try:
- check = subprocess.Popen(['checkstyle', '-c', style_file] + java_files,
+ check = subprocess.Popen(['java', '-cp',
+ 'third_party/checkstyle/checkstyle-5.7-all.jar',
+ 'com.puppycrawl.tools.checkstyle.Main', '-c',
+ style_file] + java_files,
stdout=subprocess.PIPE, env=checkstyle_env)
stdout, _ = check.communicate()
if check.returncode == 0:
@@ -56,4 +59,4 @@ def RunCheckstyle(input_api, output_api, style_file):
full_path, end = error.split(':', 1)
rel_path = os.path.relpath(full_path, local_path)
output.append(' %s:%s' % (rel_path, end))
- return [output_api.PresubmitPromptWarning('\n'.join(output))]
+ return [output_api.PresubmitPromptWarning('\n'.join(output))]
« no previous file with comments | « third_party/checkstyle/sun_checks.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698