From 5d9801e1e45da2ea021562be2093626087521e3a Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sun, 16 Nov 2025 04:26:34 +1000 Subject: [PATCH] Makefile: Add createwordlist target to regenerate the ignored words list codespell is a popular Python package: https://pypi.org/project/codespell/ We already run codespell with pre-commit. This addition to the Makefile is for tooling and developer productivity. Helpful when doing a local cleanup of the spelling --- Makefile | 6 +++++- requirements-dev.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2c95cf3dcbb..bf4dd2dbfbe 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ PYTHON := $(shell command -v python || command -v python3 || echo python) PIP := $(PYTHON) -m pip -.PHONY: check checkinstall checkupdate install +.PHONY: check checkinstall checkupdate createwordlist install check: checkinstall @echo "Running pre-commit checks..." @@ -32,6 +32,10 @@ checkupdate: @echo "Updating pre-commit hooks..." pre-commit autoupdate +createwordlist: install + @echo "Regenerating the ignored words list codespell.txt" + codespell --skip='./extras' | cut -f2 -d' ' | tr A-Z a-z | sort | uniq > .github/linters/codespell.txt + install: @echo "Installing dependencies..." @if [ -f requirements-dev.txt ]; then \ diff --git a/requirements-dev.txt b/requirements-dev.txt index 416634f5288..72c7776316f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1 +1,2 @@ +codespell pre-commit