diff options
| -rw-r--r-- | scripts/HeaderCheck.py | 6 | ||||
| -rw-r--r-- | scripts/HeaderOrder.txt | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/scripts/HeaderCheck.py b/scripts/HeaderCheck.py index ba78ec56f..7feac9a68 100644 --- a/scripts/HeaderCheck.py +++ b/scripts/HeaderCheck.py @@ -40,6 +40,7 @@ def CheckFiles(root): #~ print(filePaths) masterHeaderList = ExtractHeaders(os.path.join(root, "scripts/HeaderOrder.txt")) orderedPaths = sorted(filePaths, key=str.casefold) + allIncs = set() for f in orderedPaths: if "LexCaml" in f: # LexCaml adds system headers in #if to be an external lexer continue @@ -47,6 +48,7 @@ def CheckFiles(root): incs = ExtractHeaders(f) #~ print("\n".join(incs)) news = set(incs) - set(masterHeaderList) + allIncs = allIncs.union(set(incs)) m = 0 i = 0 while i < len(incs): @@ -73,5 +75,9 @@ def CheckFiles(root): i += 1 #~ return #print("Master header list", " ".join(masterHeaderList)) + unused = sorted(set(masterHeaderList) - allIncs) + if unused: + print("In HeaderOrder.txt but not used") + print("\n".join(unused)) CheckFiles("..") diff --git a/scripts/HeaderOrder.txt b/scripts/HeaderOrder.txt index 31fb3fcda..b1273e8f2 100644 --- a/scripts/HeaderOrder.txt +++ b/scripts/HeaderOrder.txt @@ -9,11 +9,9 @@ #include <string.h> #include <stdio.h> #include <stdarg.h> -#include <time.h> #include <math.h> #include <assert.h> #include <ctype.h> -#include <limits.h> #include <wchar.h> // C++ wrappers of C standard library @@ -33,10 +31,8 @@ #include <stdexcept> #include <new> #include <utility> -#include <tuple> #include <string> #include <vector> -#include <deque> #include <map> #include <set> #include <forward_list> |
