From fe06b2bec549036c942002f59393cc22e1d79cd7 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Thu, 27 Mar 2025 19:45:30 +0100 Subject: [PATCH] maintainer-makefile: Check spelling using 'codespell'. * top/maint.mk (sc_codespell): Add. --- ChangeLog | 5 +++++ top/maint.mk | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index d60af23955..a6b62b9f44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025-03-27 Simon Josefsson + + maintainer-makefile: Check spelling using 'codespell'. + * top/maint.mk (sc_codespell): Add. + 2025-03-24 Paul Eggert same-inode: don't assume memory objects have ino diff --git a/top/maint.mk b/top/maint.mk index 8c9fff55ab..4ac59914c8 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -1815,6 +1815,21 @@ sc_indent: exit 1; } || :; \ fi +# Check code spelling. +# Example 'cfg.mk' settings for inspiration: +# codespell_ignore_words_list = foo +# exclude_file_name_regexp--sc_codespell = ^po/.*.po|doc/.*.pdf$$ +# codespell_extra_args = --summary --count +# codespell_args = --ignore-words=doc/my-codespell-ignores.txt +codespell_args ?= --ignore-words-list $(codespell_ignore_words_list) \ + $(codespell_extra_args) +sc_codespell: + @if ! command -v codespell > /dev/null; then \ + echo 1>&2 '$(ME): sc_codespell: codespell is missing'; \ + else \ + codespell $(codespell_args) $$($(VC_LIST_EXCEPT)); \ + fi + # If you want to set UPDATE_COPYRIGHT_* environment variables, # put the assignments in this variable. update-copyright-env ?= -- 2.39.5