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

Unified Diff: third_party/WebKit/PRESUBMIT.py

Issue 2236993002: Do not call check-webkit-style with empty affected file list as it tries to check all edited files … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | third_party/WebKit/PRESUBMIT_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PRESUBMIT.py
diff --git a/third_party/WebKit/PRESUBMIT.py b/third_party/WebKit/PRESUBMIT.py
index c252d5ea67ef99080c7d99d13ae6c4901e7983df..c385157250137e77a50f2f4711ed988f3c5acb39 100644
--- a/third_party/WebKit/PRESUBMIT.py
+++ b/third_party/WebKit/PRESUBMIT.py
@@ -137,11 +137,16 @@ def _CheckStyle(input_api, output_api):
re_chromium_style_file = re.compile(r'\b[a-z_]+\.(cc|h)$')
style_checker_path = input_api.os_path.join(input_api.PresubmitLocalPath(),
'Tools', 'Scripts', 'check-webkit-style')
- args = ([input_api.python_executable, style_checker_path, '--diff-files']
- + [input_api.os_path.join('..', '..', f.LocalPath())
- for f in input_api.AffectedFiles()
- # Filter out files that follow Chromium's coding style.
- if not re_chromium_style_file.search(f.LocalPath())])
+ args = [input_api.python_executable, style_checker_path, '--diff-files']
+ files = [input_api.os_path.join('..', '..', f.LocalPath())
+ for f in input_api.AffectedFiles()
+ # Filter out files that follow Chromium's coding style.
+ if not re_chromium_style_file.search(f.LocalPath())]
+ # Do not call check-webkit-style with empty affected file list if all
+ # input_api.AffectedFiles got filtered.
+ if not files:
+ return []
+ args += files
results = []
try:
« no previous file with comments | « no previous file | third_party/WebKit/PRESUBMIT_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698