Skip to content

Conversation

@thompson-tomo
Copy link
Contributor

@thompson-tomo thompson-tomo commented Nov 22, 2025

Fixes #4728

Changes

This makes an attempt to replace misspell with cspell.

Cspell was selected due to:

  • eliminating the need for a go-environment
  • the visual studio code integration
  • github action available
  • cspell is use in the otel.io repo

While working through the switch, corrections to text was made as necessary or added to dictionary. Note i started with the same dictionary as otel.io and extended it in 133810c

Note text within ` code blocks are automatically excluded hence text has been standardised.

For non-trivial changes, follow the change proposal process.

@thompson-tomo thompson-tomo requested review from a team as code owners November 22, 2025 09:47
@thompson-tomo
Copy link
Contributor Author

An extension to this PR could be to add in https://textlint.github.io/ also similar to otel.io but out of scope.

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

.cspell.yaml Outdated
- name: CodeBlock
pattern: |
/
^(\s*[~`]{3,}) # code-block start
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are ~ code blocks a thing?

Suggested change
^(\s*[~`]{3,}) # code-block start
^(\s*[`]{3,}) # code-block start

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the docs they are https://www.markdownguide.org/extended-syntax/#fenced-code-blocks & it is also the regex from otel.io.

.cspell.yaml Outdated
Comment on lines 24 to 25
([~`])
[^~`]*?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question here

Suggested change
([~`])
[^~`]*?
([`])
[^`]*?

Copy link
Contributor Author

@thompson-tomo thompson-tomo Nov 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above but this is in addition to otel.io


# Attempt to fix issues / regenerate tables.
.PHONY: fix
fix: misspell-correction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does CSPELL have an autocorrect function?

If not I'd prefer not to move to CSPELL. My opinion on lints in general is if you can't get a tool to automatically do it, it's just a hassle for everyone. While misspell may not have the same feature-set of cspell, I don't want to switch until fix works.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree that cspell in the community repo can sometimes be annoying (maintaining the dictionary).

That said, it did catch a lot of misspellings in this PR!

A couple of thoughts:

  • we could avoid running it on PRs and instead have a nightly job that opens an issue if it fails, so any issues can be fixed async (possibly by assigning the issue to copilot)
  • we could start running copilot (or other code reviewer) on all PRs which should catch spelling mistakes going forward without relying on cspell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace misspell with cspell

4 participants