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

Unified Diff: PRESUBMIT.py

Issue 2568473002: Presubmit: Skip third_party for fwd decl warning (Closed)
Patch Set: Rebase + escape backslashes properly Created 4 years 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 | PRESUBMIT_test.py » ('j') | 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 60090e1533deaf9505ed87ba045f16b51f8200c1..da46670970c7c4a7bb7c5b42566b0d60a6491044 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1586,8 +1586,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+);$',
@@ -1595,6 +1596,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')):
+ continue
+
if not f.LocalPath().endswith('.h'):
continue
« no previous file with comments | « no previous file | PRESUBMIT_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698