diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/HeaderCheck.py | 6 | ||||
-rw-r--r-- | scripts/HeaderOrder.txt | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/scripts/HeaderCheck.py b/scripts/HeaderCheck.py index f8a7f582e..058832e31 100644 --- a/scripts/HeaderCheck.py +++ b/scripts/HeaderCheck.py @@ -41,6 +41,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 @@ -48,6 +49,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): @@ -74,5 +76,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 03eb3d539..53a1d7778 100644 --- a/scripts/HeaderOrder.txt +++ b/scripts/HeaderOrder.txt @@ -9,11 +9,8 @@ #include <string.h> #include <stdio.h> #include <stdarg.h> -#include <time.h> -#include <math.h> #include <assert.h> #include <ctype.h> -#include <limits.h> // C++ wrappers of C standard library #include <cstddef> @@ -32,11 +29,9 @@ #include <stdexcept> #include <new> #include <utility> -#include <tuple> #include <string> #include <string_view> #include <vector> -#include <deque> #include <map> #include <set> #include <forward_list> |