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

Unified Diff: PRESUBMIT.py

Issue 2477973002: Exclude third_party/crashpad from IPC presubmit (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 655d7b871e81ccb5a3982dd2a5ba3e198f9d6394..dcfe370157dd9036fb278cd683c054f4581c39fe 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1457,6 +1457,12 @@ def _CheckIpcOwners(input_api, output_api):
'*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 @@ def _CheckIpcOwners(input_api, output_api):
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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698