From ddebf4653d98a15c45ddec7c0a7e35a3f74316a1 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 7 Feb 2025 09:11:02 -0500 Subject: ci: Do not check commit messages with 'typos' due to false positives Since commit c3777c1536 (ci: Extend spellcheck job with 'typos' tool, 2025-01-04) we check spelling with `typos` in addition to the pre-existing check with `codespell`. Unlike `codespell`, `typos` can find typos in combined identifiers, e.g., `PascalCase` or `snake_case`. That works well for code, but in commit messages it can trigger on "words" in the middle of commit hashes. --- .gitlab/ci/typos.bash | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitlab/ci/typos.bash b/.gitlab/ci/typos.bash index d23928e..7293a03 100755 --- a/.gitlab/ci/typos.bash +++ b/.gitlab/ci/typos.bash @@ -7,11 +7,8 @@ result=0 echo "Running 'typos' on source code..." typos || result=1 -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 - echo "Running 'typos' on commit message of $COMMIT..." - git show --format=%B -s "$COMMIT" | typos - || result=1 - done -fi +# FIXME(typos): checking commit messages hits false positives +# on "words" inside commit hashes. We'd need a way to disable +# checking of combined identifiers to avoid this. exit $result -- cgit v0.12