Index: tools/chrome_remote_control/PRESUBMIT.py |
diff --git a/tools/gpu/PRESUBMIT.py b/tools/chrome_remote_control/PRESUBMIT.py |
similarity index 66% |
copy from tools/gpu/PRESUBMIT.py |
copy to tools/chrome_remote_control/PRESUBMIT.py |
index b7480df5b4da02ec7af2775762179505fe0b66e6..40079ff94a91d5aadf9b58f51f1fc3df457e5ffc 100644 |
--- a/tools/gpu/PRESUBMIT.py |
+++ b/tools/chrome_remote_control/PRESUBMIT.py |
@@ -5,26 +5,34 @@ import os |
import sys |
PYLINT_BLACKLIST = [] |
-PYLINT_DISABLED_WARNINGS = [] |
+PYLINT_DISABLED_WARNINGS = ['R0923'] |
-def CheckChangeOnUpload(input_api, output_api): |
- report = [] |
- report.extend(input_api.canned_checks.PanProjectChecks( |
+def _CommonChecks(input_api, output_api): |
+ results = [] |
+ results.extend(input_api.canned_checks.PanProjectChecks( |
input_api, output_api)) |
- return report |
-def CheckChangeOnCommit(input_api, output_api): |
- report = [] |
- report.extend(input_api.canned_checks.PanProjectChecks(input_api, output_api)) |
old_sys_path = sys.path |
try: |
sys.path = [os.path.join('..', 'chrome_remote_control')] + sys.path |
- report.extend(input_api.canned_checks.RunPylint( |
+ results.extend(input_api.canned_checks.RunPylint( |
input_api, output_api, |
black_list=PYLINT_BLACKLIST, |
disabled_warnings=PYLINT_DISABLED_WARNINGS)) |
finally: |
sys.path = old_sys_path |
+ |
+ |
+ return results |
+ |
+def CheckChangeOnUpload(input_api, output_api): |
+ report = [] |
+ report.extend(_CommonChecks(input_api, output_api)) |
+ return report |
+ |
+def CheckChangeOnCommit(input_api, output_api): |
+ report = [] |
+ report.extend(_CommonChecks(input_api, output_api)) |
return report |