diff options
| author | mitchell <unknown> | 2020-03-27 13:49:37 -0400 |
|---|---|---|
| committer | mitchell <unknown> | 2020-03-27 13:49:37 -0400 |
| commit | 202e9914a903b4b4a96d6690e0dad5406fc78fa8 (patch) | |
| tree | fd735ec399c751a3c96675ea3663aa573c92414c /scripts/HeaderCheck.py | |
| parent | 56a8cf324f8f69ca64c9d8abb4ef39777e73e81b (diff) | |
| download | scintilla-mirror-202e9914a903b4b4a96d6690e0dad5406fc78fa8.tar.gz | |
Backport: List headers in HeaderOrder.txt that are not used.
Remove unused headers from HeaderOrder.txt.
Backport of changeset 8007:a1bf5fa32baa.
Diffstat (limited to 'scripts/HeaderCheck.py')
| -rw-r--r-- | scripts/HeaderCheck.py | 6 |
1 files changed, 6 insertions, 0 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("..") |
