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

Unified Diff: tools/chrome_remote_control/PRESUBMIT.py

Issue 10984018: [chrome_remote_control] Add pylint to PRESUMMIT and fix lint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 8 years, 3 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 | « no previous file | tools/chrome_remote_control/chrome_remote_control/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | tools/chrome_remote_control/chrome_remote_control/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698