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

Unified Diff: build/check_gn_headers.py

Issue 2841323003: Handle |public| in check_gn_headers.py (Closed)
Patch Set: add tests Created 3 years, 8 months 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 | build/check_gn_headers_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/check_gn_headers.py
diff --git a/build/check_gn_headers.py b/build/check_gn_headers.py
index be1e797a77e381623735d75de356268279721fa9..73f1593ef0889f4ceaea8832e1904d32733b201a 100755
--- a/build/check_gn_headers.py
+++ b/build/check_gn_headers.py
@@ -76,7 +76,12 @@ def ParseGNProjectJSON(gn):
all_headers = set()
for _target, properties in gn['targets'].iteritems():
- for f in properties.get('sources', []):
+ sources = properties.get('sources', [])
+ public = properties.get('public', [])
+ # Exclude '"public": "*"'.
+ if type(public) is list:
+ sources += public
+ for f in sources:
if f.endswith('.h') or f.endswith('.hh'):
if f.startswith('//'):
f = f[2:] # Strip the '//' prefix.
« no previous file with comments | « no previous file | build/check_gn_headers_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698