瀏覽代碼

Fix a bug in practracker's handling of .may_include in headers

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"
Nick Mathewson 5 年之前
父節點
當前提交
318de94e49
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      scripts/maint/practracker/practracker.py

+ 2 - 1
scripts/maint/practracker/practracker.py

@@ -213,7 +213,8 @@ def main(argv):
     filt.addThreshold(problem.FileSizeItem("*.h", int(args.max_h_file_size)))
     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.IncludeCountItem("*.h", int(args.max_h_include_count)))
     filt.addThreshold(problem.FunctionSizeItem("*.c", int(args.max_function_size)))
     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
     # 1) Get all the .c files we care about
     files_list = util.get_tor_c_files(TOR_TOPDIR)
     files_list = util.get_tor_c_files(TOR_TOPDIR)