]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3267] add EXCLUDE_LIST in find headers script
authorAndrei Pavel <andrei@isc.org>
Thu, 21 Mar 2024 14:55:06 +0000 (16:55 +0200)
committerAndrei Pavel <andrei@isc.org>
Thu, 21 Mar 2024 16:00:16 +0000 (18:00 +0200)
tools/find-uninstalled-headers.py

index 2b934b59fc0e8e157c44017239ab02c4f471dae1..2d3dda450ec4cf271fb03329e82d3373292f9ad6 100755 (executable)
@@ -12,6 +12,11 @@ import re
 import sys
 
 
+EXCLUDE_LIST = [
+    'src/lib/dns/name_internal.h',
+]
+
+
 def main():
     makefile_ams = sorted(pathlib.Path('./src/lib').glob('**/Makefile.am'))
     headers = sorted(pathlib.Path('./src/lib').glob('**/*.h'))
@@ -59,13 +64,16 @@ def main():
 
     first = True
     for header in headers:
-        if not any(i in header.parts for i in ['tests', 'testutils', 'unittests']):
-            if first:
-                print('The following headers are not in the _HEADERS section of '
-                      'their respective Makefile.am file:')
-                first = False
-            print(f'- {header}')
-            failure = True
+        if str(header) in EXCLUDE_LIST:
+            continue
+        if any(i in header.parts for i in ['tests', 'testutils', 'unittests']):
+            continue
+        if first:
+            print('The following headers are not in the _HEADERS section of '
+                    'their respective Makefile.am file:')
+            first = False
+        print(f'- {header}')
+        failure = True
 
     if failure:
         sys.exit(1)