From ba2de727347d48bc58bcf81dcf132271d4f9a600 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 26 Nov 2023 17:44:44 +0100 Subject: [PATCH] codespell.yml: Make CI reject spelling errors using codespell --- .github/workflows/codespell.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..ede05f0 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,34 @@ +# Copyright (c) 2023 Sebastian Pipping +# Licensed under Apache License Version 2.0 + +name: Enforce codespell-clean spelling + +on: + pull_request: + push: + schedule: + - cron: '0 3 * * 5' # Every Friday at 3am + workflow_dispatch: + +# Minimum permissions for security +permissions: + contents: read + +jobs: + codespell: + name: Enforce codespell-clean spelling + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: 'Workaround codespell issue #3233' + run: |- + # Argument "--ignore-words-list Nd" is broken in codespell + # so we hide "Nd" from codespell until there is a fix. + # https://github.com/codespell-project/codespell/issues/3233 + sed 's,\.Nd ,.XX ,' -i ttyplot.1 + + - uses: codespell-project/actions-codespell@94259cd8be02ad2903ba34a22d9c13de21a74461 # v2.0 + with: + # "Nd" is from ".Nd" in ttyplot.1 + ignore_words_list: Nd