Allow use of checkstyle outside of main PRESUBMIT.py
This commit allows the use of checkstyle outside of the main PRESUBMIT
script in src. Since checkstyle can possibly be called from a subfolder
of src the absolute path to the java files are used instead of relative
to src.
We also honor the EXCLUDED_PATH blacklist for Java files.
BUG=446633
Review URL: https://codereview.chromium.org/839583006
Cr-Commit-Position: refs/heads/master@{#312287}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 9bc1f0fd..ad5b854 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1217,7 +1217,8 @@
sys.path = original_sys_path
return checkstyle.RunCheckstyle(
- input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml')
+ input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml',
+ black_list=_EXCLUDED_PATHS)
def _CheckForCopyrightedCode(input_api, output_api):