find-unusedheaders.sh: give less false warnings

- filter out two modules without relevant files
- search for files in include not in path/file.h
format, but only as file.h as seen with basctl/basctldllapi.h

Change-Id: I42192cc6d923132778ad46271c725bd7049b1bb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193423
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Gabor Kelemen
2026-01-07 12:19:29 +01:00
parent 3f0da602af
commit e24f4a74b6
+3 -1
View File
@@ -43,9 +43,11 @@ for subdir in $(ls -d */ | grep -v \
-e remotebridges/ \
-e reportbuilder/ \
-e ridljar/ \
-e salhelper/ \
-e schema/ \
-e scp2/ \
-e smoketest/ \
-e static/ \
-e swext/ \
-e sysui/ \
-e udkapi/ \
@@ -81,7 +83,7 @@ echo "Checking global headers";
# Search for files in include is different since they can be used in any module
for i in $(find include/ -name "*\.h" -o -name "*\.hxx" -o -name "\.hrc" | cut -d "/" -f 2- ); do
# Some headers are only included between double quotes
if [ $(git grep -l -e \<$i\> -e \"$i\" {*\.[hc]xx,*\.[hc],*\.hrc,*\.mm,*\.m} | grep -v pch | wc -l) -eq 0 ] ; then
if [ $(git grep -l -e \<$i\> -e \"$i\" -e \"$(basename $i)\" {*\.[hc]xx,*\.[hc],*\.hrc,*\.mm,*\.m} | grep -v pch | wc -l) -eq 0 ] ; then
echo "Out of use header: include/$i";
fi
done