]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a bug in practracker's handling of .may_include in headers
authorNick Mathewson <nickm@torproject.org>
Mon, 26 Aug 2019 16:30:18 +0000 (12:30 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 5 Sep 2019 20:16:20 +0000 (16:16 -0400)
I was expecting our filter code to work in a way it didn't.  I
thought that saying that DependencyViolation applied to "*" would
hit all of the files -- but actually, "*" wasn't implemented.  I had
to say "*.c" and "*.h"

scripts/maint/practracker/practracker.py

index 6483b88da137311e0b3c75a9203e9acc1d7bcc03..b280a767659d386fe2f38e56ef79ee079ca29f57 100755 (executable)
@@ -213,7 +213,8 @@ def main(argv):
     filt.addThreshold(problem.FileSizeItem("*.h", int(args.max_h_file_size)))
     filt.addThreshold(problem.IncludeCountItem("*.h", int(args.max_h_include_count)))
     filt.addThreshold(problem.FunctionSizeItem("*.c", int(args.max_function_size)))
-    filt.addThreshold(problem.DependencyViolationItem("*", int(args.max_dependency_violations)))
+    filt.addThreshold(problem.DependencyViolationItem("*.c", int(args.max_dependency_violations)))
+    filt.addThreshold(problem.DependencyViolationItem("*.h", int(args.max_dependency_violations)))
 
     # 1) Get all the .c files we care about
     files_list = util.get_tor_c_files(TOR_TOPDIR)