Add a script and CI action for tests/allheaders.h

Check that all headers are either #included or mentioned
in tests/allheaders.h.
This commit is contained in:
Lauri Nurmi
2025-01-31 17:32:00 +01:00
committed by Vadim Zeitlin
parent 01ecc95cea
commit f88a0a933d
2 changed files with 27 additions and 0 deletions
+12
View File
@@ -101,3 +101,15 @@ jobs:
echo "::error ::Please use C++11 equivalents of the deprecated macros in the new code."
exit 1
fi
check-allheaders:
runs-on: ubuntu-20.04
name: Check All Headers In allheaders.h
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check that all headers are listed in tests/allheaders.h
run: |
./misc/scripts/check_allheaders.sh
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
cd $(dirname "$0")/../..
rc=0
for h in include/wx/*.h ; do
header=wx/$(basename "$h")
if ! grep -q "$header" tests/allheaders.h ; then
echo "ERROR - <$header> not present in tests/allheaders.h"
rc=$((rc+1))
fi
done
exit $rc