Make includes interface more like the rest of practracker

Everything else assumes that somebody else will open the file for it.
This commit is contained in:
Nick Mathewson
2019-08-05 17:31:49 -04:00
parent 6b26281b50
commit 2a3c727dfe
2 changed files with 11 additions and 10 deletions
+3 -1
View File
@@ -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)