Skip to content

Commit

Permalink
[#3267] add EXCLUDE_LIST in find headers script
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-pavel committed Mar 21, 2024
1 parent 8c5a46e commit 3dd4ec9
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions tools/find-uninstalled-headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
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'))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3dd4ec9

Please sign in to comment.