From ed87f5fed9e4974e722f6f54735cda72a1428401 Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Tue, 25 Aug 2026 13:32:37 -0700 Subject: [PATCH 1/7] Enable codespell on book docs to catch typos/misspellings --- .codespellrc | 2 ++ .github/workflows/ci.yaml | 2 ++ Makefile | 10 +++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..7cdaab1e8b --- /dev/null +++ b/.codespellrc @@ -0,0 +1,2 @@ +[codespell] +skip = */node_modules/*,book/book/*,*.bundle.js,*/package-lock.json,book/src/tutorials/prs.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0e31612190..2d7700022a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,6 +21,8 @@ jobs: - run: make fmt - run: make tidy - run: make vet + - run: pipx install codespell + - run: make spell-check - run: make test-generate - run: make test-unit - run: make test-system diff --git a/Makefile b/Makefile index 6367d44e61..3116f61c15 100644 --- a/Makefile +++ b/Makefile @@ -83,9 +83,17 @@ markdown-lint: @npm install --no-save markdownlint-cli@0.35.0 @npx markdownlint --ignore-path .gitignore . +.PHONY: spell-check +spell-check: + @command -v codespell >/dev/null || { \ + echo "codespell not found; install it with 'brew install codespell'"; \ + exit 1; \ + } + @codespell book + # CI performs these actions individually since that looks nicer in the UI; # this is a shortcut so that a local dev can easily run everything. -test-ci: fmt tidy vet test-generate test-unit test-system test-heavy +test-ci: fmt tidy vet spell-check test-generate test-unit test-system test-heavy clean: @rm -rf dist From 790a3a6aeec839a69eb4d1e03c96b185ba7c18d0 Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Tue, 25 Aug 2026 14:50:08 -0700 Subject: [PATCH 2/7] In Actions, run codespell as part of markdown-lint --- .github/workflows/ci.yaml | 2 -- .github/workflows/markdown-lint.yaml | 12 ++++++++---- CONTRIBUTING.md | 6 ++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2d7700022a..0e31612190 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,8 +21,6 @@ jobs: - run: make fmt - run: make tidy - run: make vet - - run: pipx install codespell - - run: make spell-check - run: make test-generate - run: make test-unit - run: make test-system diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/markdown-lint.yaml index 70ce029166..92096ce221 100644 --- a/.github/workflows/markdown-lint.yaml +++ b/.github/workflows/markdown-lint.yaml @@ -7,15 +7,19 @@ on: pull_request: paths: - '**.md' + - 'book/**' jobs: - markdown-link: + markdown-lint: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Lint run: make markdown-lint + - name: Spell check + run: pipx install codespell && make spell-check + - id: setup-chrome uses: browser-actions/setup-chrome@v2 with: @@ -29,13 +33,13 @@ jobs: fail_on_error: true filter_mode: nofilter - - name: Inform Slack users of link check failures + - name: Inform Slack users of check failures uses: tiloio/slack-webhook-action@v1.1.2 if: failure() && github.ref_name == 'main' with: slack_web_hook_url: ${{ secrets.SLACK_WEBHOOK_BRIMLABS_DOCS }} slack_json: | { - "username": "markdown-link", - "text": "Markdown link check failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + "username": "markdown-lint", + "text": "Markdown lint check failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a9d3be17e..8a8b566c43 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,3 +46,9 @@ System tests require Python 3.3 or better. To run them, execute: ``` make test-system ``` + +Spell checking of the book docs requires +[codespell](https://github.com/codespell-project/codespell). To run it, execute: +``` +make spell-check +``` From 659043421a031933b61401ff2dfd68c30e82d786 Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Wed, 26 Aug 2026 12:10:23 -0700 Subject: [PATCH 3/7] Move text to book/README, drop .codespellrc in favor of book/Makefile target --- .codespellrc | 2 -- .github/workflows/markdown-lint.yaml | 2 +- CONTRIBUTING.md | 6 ------ Makefile | 12 ++++-------- book/Makefile | 8 ++++++++ book/README.md | 11 +++++++++++ 6 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc deleted file mode 100644 index 7cdaab1e8b..0000000000 --- a/.codespellrc +++ /dev/null @@ -1,2 +0,0 @@ -[codespell] -skip = */node_modules/*,book/book/*,*.bundle.js,*/package-lock.json,book/src/tutorials/prs.json diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/markdown-lint.yaml index 92096ce221..ee4240a93a 100644 --- a/.github/workflows/markdown-lint.yaml +++ b/.github/workflows/markdown-lint.yaml @@ -18,7 +18,7 @@ jobs: run: make markdown-lint - name: Spell check - run: pipx install codespell && make spell-check + run: pipx install codespell && make codespell - id: setup-chrome uses: browser-actions/setup-chrome@v2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8a8b566c43..6a9d3be17e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,9 +46,3 @@ System tests require Python 3.3 or better. To run them, execute: ``` make test-system ``` - -Spell checking of the book docs requires -[codespell](https://github.com/codespell-project/codespell). To run it, execute: -``` -make spell-check -``` diff --git a/Makefile b/Makefile index 3116f61c15..d3c7948791 100644 --- a/Makefile +++ b/Makefile @@ -83,17 +83,13 @@ markdown-lint: @npm install --no-save markdownlint-cli@0.35.0 @npx markdownlint --ignore-path .gitignore . -.PHONY: spell-check -spell-check: - @command -v codespell >/dev/null || { \ - echo "codespell not found; install it with 'brew install codespell'"; \ - exit 1; \ - } - @codespell book +.PHONY: codespell +codespell: + $(MAKE) -C book $@ # CI performs these actions individually since that looks nicer in the UI; # this is a shortcut so that a local dev can easily run everything. -test-ci: fmt tidy vet spell-check test-generate test-unit test-system test-heavy +test-ci: fmt tidy vet codespell test-generate test-unit test-system test-heavy clean: @rm -rf dist diff --git a/book/Makefile b/book/Makefile index e1761806cd..083637a988 100644 --- a/book/Makefile +++ b/book/Makefile @@ -14,3 +14,11 @@ node_modules: vet: GOOS=js GOARCH=wasm go vet super-example/main.go + +.PHONY: codespell +codespell: + @command -v codespell >/dev/null || { \ + echo "codespell not found; install it with 'brew install codespell'"; \ + exit 1; \ + } + git ls-files -c -o --exclude-standard | xargs codespell -S src/tutorials/prs.json diff --git a/book/README.md b/book/README.md index 1f189cf700..50a643d4bc 100644 --- a/book/README.md +++ b/book/README.md @@ -32,6 +32,17 @@ After editing any JavaScript or Go files run `make` in this directory. This will update the Wasm file so playground examples use a version of SuperDB built from Go source files in the local repository. +The docs are spell checked with [codespell](https://github.com/codespell-project/codespell). +Install it with Homebrew: +```sh +brew install codespell +``` +then check your work with +```sh +make codespell +``` +This also runs as part of `make test-ci` and in CI. + ## Conventions The following is an evolving set of style conventions we've adopted when From 5b29b5f2ec13e849f1f1c9af2e3603f5982e40f1 Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Wed, 26 Aug 2026 15:55:44 -0700 Subject: [PATCH 4/7] PR feedback: Drop check for missing codespell --- book/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/book/Makefile b/book/Makefile index 083637a988..256d5d738d 100644 --- a/book/Makefile +++ b/book/Makefile @@ -17,8 +17,4 @@ vet: .PHONY: codespell codespell: - @command -v codespell >/dev/null || { \ - echo "codespell not found; install it with 'brew install codespell'"; \ - exit 1; \ - } git ls-files -c -o --exclude-standard | xargs codespell -S src/tutorials/prs.json From 82c4898b532475169e0bcdc08c32fd5a222c7fda Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Wed, 26 Aug 2026 15:56:04 -0700 Subject: [PATCH 5/7] PR feedback: Drop codespell target from top-level Makefile --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d3c7948791..95142f7981 100644 --- a/Makefile +++ b/Makefile @@ -83,13 +83,10 @@ markdown-lint: @npm install --no-save markdownlint-cli@0.35.0 @npx markdownlint --ignore-path .gitignore . -.PHONY: codespell -codespell: - $(MAKE) -C book $@ - # CI performs these actions individually since that looks nicer in the UI; # this is a shortcut so that a local dev can easily run everything. -test-ci: fmt tidy vet codespell test-generate test-unit test-system test-heavy +test-ci: fmt tidy vet test-generate test-unit test-system test-heavy + $(MAKE) -C book codespell clean: @rm -rf dist From f82866ba093ec853825d17f7d7386e3020ce471f Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Wed, 26 Aug 2026 15:56:55 -0700 Subject: [PATCH 6/7] In markdown-lint Workflow, invoke codespell from book directory --- .github/workflows/markdown-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/markdown-lint.yaml index ee4240a93a..0be6f0b8f0 100644 --- a/.github/workflows/markdown-lint.yaml +++ b/.github/workflows/markdown-lint.yaml @@ -18,7 +18,7 @@ jobs: run: make markdown-lint - name: Spell check - run: pipx install codespell && make codespell + run: pipx install codespell && make -C book codespell - id: setup-chrome uses: browser-actions/setup-chrome@v2 From 0525ae32462706048a72a02209398e4af893c597 Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Wed, 26 Aug 2026 16:20:18 -0700 Subject: [PATCH 7/7] PR feedback: Use pip instead of pipx --- .github/workflows/markdown-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/markdown-lint.yaml index 0be6f0b8f0..2bd03ffe49 100644 --- a/.github/workflows/markdown-lint.yaml +++ b/.github/workflows/markdown-lint.yaml @@ -18,7 +18,7 @@ jobs: run: make markdown-lint - name: Spell check - run: pipx install codespell && make -C book codespell + run: pip install codespell && make -C book codespell - id: setup-chrome uses: browser-actions/setup-chrome@v2