diff --git a/.codespell-ignore b/.codespell-ignore new file mode 100644 index 0000000..bcea1f3 --- /dev/null +++ b/.codespell-ignore @@ -0,0 +1,11 @@ +monerod +pplns +p2pool +tari +xvb +onion +pithead +rigforge +stratum +tor +xmrig diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..32b8006 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,5 @@ +[codespell] +# Spell-check public-facing copy and docs. https://github.com/codespell-project/codespell +# Crypto/Monero/Tari jargon (XMR, monerod, PPLNS, Tari, …) lives in .codespell-ignore. +skip = .git,node_modules,public,resources,package-lock.json,data/releases.json,*.svg,*.png,*.ico,*.woff,*.woff2 +ignore-words = .codespell-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e96840..59c9add 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,3 +72,15 @@ jobs: run: npm run format:check - name: markdownlint run: npm run lint:md + + spell: + name: Spell check (codespell) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + persist-credentials: false # zizmor: artipacked + # pipx is preinstalled on ubuntu runners. Config + dictionary: .codespellrc / .codespell-ignore. + - name: Run codespell + run: pipx run codespell==2.4.2 . diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ddd5f5..5a36347 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,6 +35,10 @@ not in the templates. See the [README](README.md#where-the-content-lives) for th 4. Update the README or other docs for any user-facing change. +CI also runs Prettier + markdownlint (`npm run lint`) and a spell check. Run the spell check +locally with `pipx run codespell .` — domain jargon (XMR, monerod, PPLNS, Tari, …) is allow-listed +in [`.codespell-ignore`](.codespell-ignore); add new terms there if a real word is flagged. + ## Secret scanning CI runs [gitleaks](https://github.com/gitleaks/gitleaks) over the full history on every push and PR,