summaryrefslogtreecommitdiff
path: root/scripts/maint/practracker/practracker.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-08-05 17:31:49 -0400
committerNick Mathewson <nickm@torproject.org>2019-08-05 17:48:06 -0400
commit2a3c727dfed7465090c2b9bae2f5ac88b3c6dca0 (patch)
tree36dd005938c308a670f8a72b3247ba07145f0f2c /scripts/maint/practracker/practracker.py
parent6b26281b50f25f0175f3ba801951324a30ba7a32 (diff)
downloadtor-2a3c727dfed7465090c2b9bae2f5ac88b3c6dca0.tar.gz
tor-2a3c727dfed7465090c2b9bae2f5ac88b3c6dca0.zip
Make includes interface more like the rest of practracker
Everything else assumes that somebody else will open the file for it.
Diffstat (limited to 'scripts/maint/practracker/practracker.py')
-rwxr-xr-xscripts/maint/practracker/practracker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/maint/practracker/practracker.py b/scripts/maint/practracker/practracker.py
index 66ebb1277d..20c8bb5b4e 100755
--- a/scripts/maint/practracker/practracker.py
+++ b/scripts/maint/practracker/practracker.py
@@ -117,8 +117,10 @@ def consider_metrics_for_file(fname, f):
for item in consider_function_size(fname, f):
yield item
+ # Check for "upward" includes
+ f.seek(0)
n = 0
- for item in includes.consider_include_rules(real_fname):
+ for item in includes.consider_include_rules(real_fname, f):
n += 1
if n:
yield problem.DependencyViolationItem(fname, n)