Commit 433d3657 authored by aurimas@chromium.org's avatar aurimas@chromium.org

[Checkstyle] Fix checkstyle path for non src/ repos.

BUG=318404
NOTRY=true

Review URL: https://codereview.chromium.org/472503003

Cr-Commit-Position: refs/heads/master@{#289422}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289422 0039d316-1c4b-4281-b951-d872f2087c98
parent a0f8bd68
......@@ -8,6 +8,13 @@ import os
import subprocess
CHROMIUM_SRC = os.path.normpath(
os.path.join(os.path.dirname(__file__),
os.pardir, os.pardir, os.pardir))
CHECKSTYLE_ROOT = os.path.join(CHROMIUM_SRC, 'third_party', 'checkstyle',
'checkstyle-5.7-all.jar')
def RunCheckstyle(input_api, output_api, style_file):
if not os.path.exists(style_file):
file_error = (' Java checkstyle configuration file is missing: '
......@@ -25,7 +32,7 @@ def RunCheckstyle(input_api, output_api, style_file):
checkstyle_env['JAVA_CMD'] = 'java'
try:
check = subprocess.Popen(['java', '-cp',
'third_party/checkstyle/checkstyle-5.7-all.jar',
CHECKSTYLE_ROOT,
'com.puppycrawl.tools.checkstyle.Main', '-c',
style_file] + java_files,
stdout=subprocess.PIPE, env=checkstyle_env)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment