bin/find-unusedheaders.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit e24f4a74b65eca286e8ff5428516aebe5e78f240 Author: Gabor Kelemen <[email protected]> AuthorDate: Wed Jul 9 17:14:05 2025 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Wed Jan 7 12:19:29 2026 +0100 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 <[email protected]> Tested-by: Jenkins diff --git a/bin/find-unusedheaders.sh b/bin/find-unusedheaders.sh index ca9dd45b2679..755c400f3184 100755 --- a/bin/find-unusedheaders.sh +++ b/bin/find-unusedheaders.sh @@ -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
