taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit ac0005704cf66a24d3fd226269f4e921ed526719
parent 47fd0e27321734affe0b5cd4f964adcea0fabaf7
Author: Florian Dold <dold@taler.net>
Date:   Fri,  4 Sep 2026 19:07:52 +0200

release checks: add repository-wide codespell check

Diffstat:
MMakefile | 1+
MREADME | 4++--
Dcontrib/ci/jobs/0-codespell/dictionary.txt | 20--------------------
Mcontrib/ci/jobs/0-codespell/job.sh | 8+-------
Acontrib/codespell-dictionary.txt | 18++++++++++++++++++
Acontrib/codespell.sh | 114+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 136 insertions(+), 29 deletions(-)

diff --git a/Makefile b/Makefile @@ -53,6 +53,7 @@ check: .PHONY: check-release-fast check-release-fast: check $(MAKE) lint + ./contrib/codespell.sh pnpm run i18n:source2po pnpm run i18n:po2strings pnpm run i18n:check diff --git a/README b/README @@ -162,8 +162,8 @@ output, isolation, and generated-file conventions. ## Release checks -Before making a release, run the build, unit tests, linter and internationalized -catalogue checks with: +Before making a release, run the build, unit tests, linter, spelling checker and +internationalized catalogue checks with: ```shell make check-release-fast diff --git a/contrib/ci/jobs/0-codespell/dictionary.txt b/contrib/ci/jobs/0-codespell/dictionary.txt @@ -1,20 +0,0 @@ -# List of "words" that codespell should ignore in our sources. -# -# Note: The word sensitivity depends on how the to-be-ignored word is -# spelled in codespell_lib/data/dictionary.txt. F.e. if there is a word -# 'foo' and you add 'Foo' _here_, codespell will continue to complain -# about 'Foo'. -# -aci -cant -ect -fo -som -te -ths -updateing -vie -zar -nam -pares -kwanza diff --git a/contrib/ci/jobs/0-codespell/job.sh b/contrib/ci/jobs/0-codespell/job.sh @@ -3,10 +3,4 @@ set -exuo pipefail job_dir=$(dirname "${BASH_SOURCE[0]}") -# ./packages/web-util/src/utils/select-ui-lists.ts -# contains words in german - -# ./packages/taler-util/src/iso-639.ts -# contains iso codes - -codespell -q 0 -I "${job_dir}"/dictionary.txt -S "*.pot,*.bib,*.bst,*.cls,*.json,*.png,*.svg,*.wav,*.gz,*/templating/test?/**,**/auditor/*.sql,**/templating/mustach**,*.fees,*key,*.tag,*.info,*.latexmkrc,*.ecc,*.jpg,*.zkey,*.sqlite,*/contrib/hellos/**,*/vpn/tests/**,*.priv,*.file,*.tgz,*.woff,*.gif,*.odt,*.fee,*.deflate,*.dat,*.jpeg,*.eps,*.odg,*/m4/ax_lib_postgresql.m4,*/m4/libgcrypt.m4,*.rpath,config.status,ABOUT-NLS,*/doc/texinfo.tex,*.PNG,*.??.json,*.docx,*.ods,*.doc,*.docx,*.xcf,*.xlsx,*.ecc,*.ttf,*.woff2,*.eot,*.ttf,*.eot,*.mp4,*.pptx,*.epgz,*.min.js,**/*.map,**/fonts/**,*.pack.js,*.po,*.bbl,*/afl-tests/*,*/.git/**,*.pdf,*.epub,**/signing-key.asc,**/pnpm-lock.yaml,**/*.svg,**/*.cls,**/rfc.bib,**/*.bst,*/cbdc-es.tex,*/cbdc-it.tex,**/ExchangeSelection/example.ts,*/testcurl/test_tricky.c,*/i18n/strings.ts,*/src/anastasis-data.ts,**/doc/flows/main.de.tex,*/node_modules/**,*.pnpm-store/**,./prebuilt/**,./packages/*/lib/**,./packages/*/dist/**,*.ico,*.tff,*.zip,*.sqlite3,./packages/taler-util/src/iso-639.ts,./packages/web-util/src/utils/select-ui-lists.ts,./packages/fix-weblate-format" +exec "${job_dir}"/../../../codespell.sh "$@" diff --git a/contrib/codespell-dictionary.txt b/contrib/codespell-dictionary.txt @@ -0,0 +1,18 @@ +# List of words that codespell should ignore in our sources. +aci +adresse +brunch +cant +ect +fo +ist +kwanza +lokal +nam +pares +som +te +ths +updateing +vie +zar diff --git a/contrib/codespell.sh b/contrib/codespell.sh @@ -0,0 +1,114 @@ +#!/bin/bash +set -euo pipefail + +script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) + +skip_patterns=( + # Generated or vendored files and directories. + "*/.git/**" + "*/afl-tests/*" + "*/node_modules/**" + "*.pnpm-store/**" + "./prebuilt/**" + "./packages/*/lib/**" + "./packages/*/dist/**" + "**/fonts/**" + "**/*.map" + "*/i18n/strings.ts" + + # Sources that intentionally contain non-English or externally defined text. + "./packages/taler-util/src/iso-639.ts" + "./packages/web-util/src/forms/gana/**" + "./packages/web-util/src/utils/select-ui-lists.ts" + "./packages/taler-merchant-webui/visual/baselines/*.aria.yml" + "**/doc/flows/main.de.tex" + "*/cbdc-es.tex" + "*/cbdc-it.tex" + "*/src/anastasis-data.ts" + + # Fixtures and generated configuration. + "*/contrib/hellos/**" + "*/vpn/tests/**" + "**/auditor/*.sql" + "**/ExchangeSelection/example.ts" + "**/signing-key.asc" + "*/m4/ax_lib_postgresql.m4" + "*/m4/libgcrypt.m4" + "*/templating/test?/**" + "**/templating/mustach**" + "*/testcurl/test_tricky.c" + "./packages/fix-weblate-format" + "ABOUT-NLS" + "config.status" + + # File formats that are generated, binary or maintained externally. + "*.??.json" + "*.PNG" + "*.bbl" + "*.bib" + "*.bst" + "*.cls" + "*.dat" + "*.deflate" + "*.doc" + "*.docx" + "*.ecc" + "*.eot" + "*.epgz" + "*.eps" + "*.epub" + "*.fee" + "*.fees" + "*.file" + "*.flac" + "*.gif" + "*.gz" + "*.ico" + "*.info" + "*.jpeg" + "*.jpg" + "*.json" + "*.latexmkrc" + "*.m4a" + "*.min.js" + "*.mp4" + "*.odg" + "*.ods" + "*.odt" + "*.pack.js" + "*.pdf" + "*.png" + "*.po" + "*.pot" + "*.pptx" + "*.priv" + "*.rpath" + "*.sqlite" + "*.sqlite3" + "*.svg" + "*.tag" + "*.tff" + "*.tgz" + "*.ttf" + "*.wav" + "*.webp" + "*.woff" + "*.woff2" + "*.xcf" + "*.xlsx" + "*.zip" + "*.zkey" + "*key" + "*/doc/texinfo.tex" + "**/pnpm-lock.yaml" + "**/rfc.bib" +) + +skip=$(IFS=,; echo "${skip_patterns[*]}") + +cd "${script_dir}/.." +exec codespell \ + -q 0 \ + -I "${script_dir}/codespell-dictionary.txt" \ + -S "${skip}" \ + "$@"