Skip to content

Conversation

SecondSkoll
Copy link
Contributor

Summary scope seems to be bugged, using "sentence" scope seems to work a lot better.

@dwilding
Copy link

I tested this in Ops docs and it checked the content that I was expecting, with no false positives. The error count was >4 times higher. But I'm not unhappy, as I have more confidence in the spellchecker! (And in the case of Ops, many of those errors are the same words over and over again - e.g., databag)

@dwilding
Copy link

dwilding commented Sep 29, 2025

@SecondSkoll
Copy link
Contributor Author

@SecondSkoll I did a bit more testing in the Ops docs. There's a very small number of false positives from our .rst files that include the Ops package source.

https://github.com/canonical/operator/blob/d875c855ffa112509d979214a99b6a80ab1cd35e/docs/reference/ops-testing.rst?plain=1#L99

The word 'call' seems to be misspelled.

https://github.com/canonical/operator/blob/d875c855ffa112509d979214a99b6a80ab1cd35e/docs/reference/ops-tracing.rst?plain=1#L6

The word 'ops_tracing' seems to be misspelled.

https://github.com/canonical/operator/blob/d875c855ffa112509d979214a99b6a80ab1cd35e/docs/reference/ops-main-entrypoint.rst?plain=1#L14

The word 'noindex' seems to be misspelled.

https://github.com/canonical/operator/blob/d875c855ffa112509d979214a99b6a80ab1cd35e/docs/reference/ops-testing-harness.rst?plain=1#L35

The word 'noindex' seems to be misspelled.

Could you retest when you have a chance? I've added two tokenignores for RST directive options (though it will only work for one word passed to an option), and a filter for spelling which should eliminate words-with-dashes and words_with_underlines. I think that should solve most cases, then project specific ignores might be needed after that...

@dwilding
Copy link

The latest changes work, thanks!

words_with_underlines seems good to exclude by default.

I'm less sure about excluding words-with-dashes by default, as wouldn't that make it harder to find spelling mistakes in hyphenated terms? That was my initial thought, but I just tried it... I removed filters: - '\w*[\-_]\w*' and put "bbad-spelling" in one of my .md files. The spellchecker didn't flag it (without the hyphen, it flags "bbad"). So it looks like hyphenated words were already not being checked?

@SecondSkoll
Copy link
Contributor Author

The latest changes work, thanks!

words_with_underlines seems good to exclude by default.

I'm less sure about excluding words-with-dashes by default, as wouldn't that make it harder to find spelling mistakes in hyphenated terms? That was my initial thought, but I just tried it... I removed filters: - '\w*[\-_]\w*' and put "bbad-spelling" in one of my .md files. The spellchecker didn't flag it (without the hyphen, it flags "bbad"). So it looks like hyphenated words were already not being checked?

Looks like the default Vale filters for spelling exclude hyphenated words. This might be down to the fact most dictionaries have little support for hyphenated words, but I'm unsure. I can update the filters, but it'll mean all hyphenated words need to be added to the ignore list.

@dwilding
Copy link

I can update the filters, but it'll mean all hyphenated words need to be added to the ignore list.

After trying the updated filters in 345c62b, I got approx 140 extra spelling errors, most of which I'd need to add to the exclude list. Michael and I just had a discussion and I feel that filters: - '\w*_+\w*' is fine as a default.

akcano
akcano previously approved these changes Oct 1, 2025
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.

3 participants