From b2821a3448b489bc751e4acf2d6da1ad6f05a834 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sat, 12 Aug 2023 19:51:30 -0300 Subject: [PATCH] build: run codespell on almost all files Ignore only third-party/vendored files (such as license files and files in m4/). And ignore more words to fix the following errors: $ make codespell Running codespell... ./README:484: als ==> also ./README:646: Shotcut ==> Shortcut ./RELNOTES:516: als ==> also ./etc/inc/disable-common.inc:506: chage ==> change, charge ./etc/apparmor/firejail-default:35: readby ==> read, read by ./etc/apparmor/firejail-default:36: readby ==> read, read by ./etc/profile-a-l/als.profile:1: als ==> also ./etc/profile-a-l/als.profile:5: als ==> also make: *** [Makefile:374: codespell] Error 65 $ codespell --version 2.2.5 --- .github/workflows/codespell.yml | 12 ++++++------ Makefile | 8 ++++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 19ae6f34d9d..e39755dbdfc 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -2,13 +2,13 @@ name: Codespell on: push: - paths: - - 'src/**' - - 'test/**' + paths-ignore: + - 'm4/**' + - COPYING pull_request: - paths: - - 'src/**' - - 'test/**' + paths-ignore: + - 'm4/**' + - COPYING permissions: # added using https://github.com/step-security/secure-workflows contents: read diff --git a/Makefile b/Makefile index 7bbdcbfd309..c04d721cf5f 100644 --- a/Makefile +++ b/Makefile @@ -366,12 +366,16 @@ cppcheck: clean scan-build: clean scan-build $(MAKE) +# TODO: Old codespell versions (such as v2.1.0 in CI) have issues with +# contrib/syscalls.sh .PHONY: codespell codespell: @printf 'Running %s...\n' $@ - @codespell --ignore-regex "UE|creat|doas|ether|isplay|shotcut" \ + @codespell --ignore-regex 'UE|als|chage|creat|doas|ether|isplay|readby|[Ss]hotcut' \ -S *.gz,*.o,*.so \ - src test + -S COPYING,m4 \ + -S ./contrib/syscalls.sh \ + . .PHONY: print-env print-env: