diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml index 520a3bf1d7..9836f87e4d 100644 --- a/.github/workflows/code_checks.yml +++ b/.github/workflows/code_checks.yml @@ -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 diff --git a/misc/scripts/check_allheaders.sh b/misc/scripts/check_allheaders.sh new file mode 100755 index 0000000000..3a5e397344 --- /dev/null +++ b/misc/scripts/check_allheaders.sh @@ -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