Exclude third_party/crashpad from IPC presubmit
Can't otherwise land https://codereview.chromium.org/2478633002/.
[email protected], [email protected]
BUG=661788
Review-Url: https://codereview.chromium.org/2477973002
Cr-Commit-Position: refs/heads/master@{#429954}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index db09432..92888ce 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1457,6 +1457,12 @@
'*TypeConverter*.*',
]
+ # These third_party directories do not contain IPCs, but contain files
+ # matching the above patterns, which trigger false positives.
+ exclude_paths = [
+ 'third_party/crashpad/*',
+ ]
+
# Dictionary mapping an OWNERS file path to Patterns.
# Patterns is a dictionary mapping glob patterns (suitable for use in per-file
# rules ) to a PatternEntry.
@@ -1492,6 +1498,13 @@
for pattern in file_patterns:
if input_api.fnmatch.fnmatch(
input_api.os_path.basename(f.LocalPath()), pattern):
+ skip = False
+ for exclude in exclude_paths:
+ if input_api.fnmatch.fnmatch(f.LocalPath(), exclude):
+ skip = True
+ break
+ if skip:
+ continue
owners_file = input_api.os_path.join(
input_api.os_path.dirname(f.LocalPath()), 'OWNERS')
if owners_file not in to_check: