From 047cfacede2127b9638b8d640eb4f5d650dcf623 Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Wed, 4 Dec 2013 07:46:23 -0800 Subject: [PATCH] Include "include" directory in source code metrics. --- metrics | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/metrics b/metrics index 0e117a2b..5aaebe6e 100755 --- a/metrics +++ b/metrics @@ -1,6 +1,7 @@ #!/usr/bin/python import glob +import itertools import re TODO_PATTERN = re.compile(r'\s*// TODO\(') @@ -19,7 +20,8 @@ num_expects = 0 num_test_empty = 0 num_test = 0 -for source_path in glob.iglob("src/*.[ch]"): +files = itertools.chain(glob.iglob("src/*.[ch]"), glob.iglob("include/*.[ch]")) +for source_path in files: num_files += 1 with open(source_path, "r") as input: for line in input: