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

Unified Diff: ui/webui/resources/PRESUBMIT.py

Issue 2889113002: web_dev_style: Fix errors in new directories and enable PRESUBMIT (Closed)
Patch Set: merge+fix Created 3 years, 7 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
Index: ui/webui/resources/PRESUBMIT.py
diff --git a/ui/webui/resources/PRESUBMIT.py b/ui/webui/resources/PRESUBMIT.py
index 813f5fdc875e6c899e7e3cb38e80aa51835ac510..ec4af5971315e50f4e200de1270e6eb40c911eea 100644
--- a/ui/webui/resources/PRESUBMIT.py
+++ b/ui/webui/resources/PRESUBMIT.py
@@ -59,4 +59,16 @@ def _CommonChecks(input_api, output_api):
results += _CheckForTranslations(input_api, output_api)
results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api,
check_js=True)
+ try:
+ import sys
+ old_sys_path = sys.path
+ cwd = input_api.PresubmitLocalPath()
+ sys.path += [input_api.os_path.join(cwd, '..', '..', '..', 'tools')]
+ from web_dev_style import presubmit_support
+ BLACKLIST = ['ui/webui/resources/js/analytics.js',
+ 'ui/webui/resources/js/jstemplate_compiled.js']
+ file_filter = lambda f: f.LocalPath() not in BLACKLIST
+ results += presubmit_support.CheckStyle(input_api, output_api, file_filter)
+ finally:
+ sys.path = old_sys_path
return results

Powered by Google App Engine
This is Rietveld 408576698