Index: third_party/WebKit/PRESUBMIT.py |
diff --git a/third_party/WebKit/PRESUBMIT.py b/third_party/WebKit/PRESUBMIT.py |
index 8d073343a52f62e7880fe77effdc74e4692f894d..af04a8a807a51c194c517507eef6393ecdd54de7 100644 |
--- a/third_party/WebKit/PRESUBMIT.py |
+++ b/third_party/WebKit/PRESUBMIT.py |
@@ -8,6 +8,7 @@ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
for more details about the presubmit API built into gcl. |
""" |
+import re |
import sys |
@@ -113,11 +114,15 @@ def _CheckTestExpectations(input_api, output_api): |
def _CheckStyle(input_api, output_api): |
+ # Files that follow Chromium's coding style do not include capital letters. |
+ 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()]) |
+ for f in input_api.AffectedFiles() |
+ # Filter out files that follow Chromium's coding style. |
+ if not re_chromium_style_file.search(f.LocalPath())]) |
results = [] |
try: |