Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index b7680b1a65d97a9d0139bac63d1eeee944fd487b..47b78605077750c4249fa3e8624ca3ea3902d038 100644 |
--- a/PRESUBMIT.py |
+++ b/PRESUBMIT.py |
@@ -1585,8 +1585,9 @@ def _CheckMojoUsesNewWrapperTypes(input_api, output_api): |
def _CheckUselessForwardDeclarations(input_api, output_api): |
- """Checks that added or removed lines in affected header files |
- do not lead to new useless class or struct forward declaration. |
+ """Checks that added or removed lines in non third party affected |
+ header files do not lead to new useless class or struct forward |
+ declaration. |
""" |
results = [] |
class_pattern = input_api.re.compile(r'^class\s+(\w+);$', |
@@ -1594,6 +1595,11 @@ def _CheckUselessForwardDeclarations(input_api, output_api): |
struct_pattern = input_api.re.compile(r'^struct\s+(\w+);$', |
input_api.re.MULTILINE) |
for f in input_api.AffectedFiles(include_deletes=False): |
+ if (f.LocalPath().startswith('third_party') and |
+ not f.LocalPath().startswith('third_party/WebKit') and |
+ not f.LocalPath().startswith('third_party\WebKit')): |
jochen (gone - plz use gerrit)
2016/12/12 07:42:02
I think you have to escape the backslash
jbriance
2016/12/12 08:07:42
Indeed, I'll fix.
|
+ continue |
+ |
if not f.LocalPath().endswith('.h'): |
continue |