diff --git a/.codespellrc b/.codespellrc index 445e98dde0..adc007f68b 100644 --- a/.codespellrc +++ b/.codespellrc @@ -5,18 +5,19 @@ check-hidden = quiet-level = 2 builtin = clear,rare,en-GB_to_en-US +# Skip paths matching fnmatch glob patterns. skip = - */.git, - */build, - */Copyright.txt, - */CTestCustom.cmake.in, - */Modules/Internal/CPack/NSIS.template.in, - */Source/CursesDialog/form/*, - */Source/kwsys/*, - */Tests/RunCMake/CPack/tests/DMG_SLA/German.*, - */Tests/RunCMake/ParseImplicitData/*.input, - */Tests/StringFileTest/test.utf8, - */Utilities/cm*, + .git, + build, + Copyright.txt, + CTestCustom.cmake.in, + Modules/Internal/CPack/NSIS.template.in, + Source/CursesDialog/form/*, + Source/kwsys/*, + Tests/RunCMake/CPack/tests/DMG_SLA/German.*, + Tests/RunCMake/ParseImplicitData/*.input, + Tests/StringFileTest/test.utf8, + Utilities/cm*, *.pfx, ignore-words-list = diff --git a/.gitlab/ci/codespell.sh b/.gitlab/ci/codespell.bash similarity index 67% rename from .gitlab/ci/codespell.sh rename to .gitlab/ci/codespell.bash index fff0b3650d..bbaffd231f 100755 --- a/.gitlab/ci/codespell.sh +++ b/.gitlab/ci/codespell.bash @@ -4,8 +4,12 @@ set -e result=0 +# 'codespell' with no arguments adds a leading './' to all paths. +# Avoid that by globbing top-level entries explicitly. +shopt -s dotglob echo "Running 'codespell' on source code..." -codespell || result=1 +codespell * || result=1 +shopt -u dotglob if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then for COMMIT in $(git rev-list "^$CI_MERGE_REQUEST_DIFF_BASE_SHA" "$CI_COMMIT_SHA"); do diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index f36b05cf72..be612953b6 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -584,7 +584,7 @@ stage: build extends: .fedora41 script: - - .gitlab/ci/codespell.sh + - .gitlab/ci/codespell.bash interruptible: true .cmake_build_linux: