typos icon indicating copy to clipboard operation
typos copied to clipboard

Typos flagging hostname

Open mynamewastaken opened this issue 3 years ago • 4 comments

error: `ot` should be `to`, `of`, `or`
  --> docs/content/team/poc/zerto.md:49:27
   |
49 | - Source computer name was ot01dv-zerto002.centralus.xxx.cloud but replica was ot01dv-zerto002. Might have to solve this with post script
   |                            ^^
   |

I can exclude this specific case, but is there a way to generalize this? Maybe regex to ignore anything that's . separated?

mynamewastaken avatar Feb 14 '22 16:02 mynamewastaken

The problem with ignoring . separated is that will ignore class.member. In most languages, that can work because a declaration of member exists and we'd spell check that. In a language like Python, we would lose spell checking of member variables.

epage avatar Feb 14 '22 17:02 epage

I understand. Our use case is markdown files with occasional snippets of embedded code (hcl, bash, go, python, etc). Are there knobs I can turn on the user side? Something by filetype perhaps? I saw the examples, but it doesn't look like it would be fine-grained enough to say something like ignore oython-specific rules in a non-python file.

In any case thanks for your work on this; I tied typos into our documentation pipeline, so if you have typos your doc doesn't get published. Works wonder for spelling errors. ;)

mynamewastaken avatar Feb 14 '22 19:02 mynamewastaken

Are there knobs I can turn on the user side?

At the moment, this is not configurable at all. I was just giving the motivation and realizing that motivation can be narrowed in scope by relying on declarations.

We could abandon class members, sacrificing some Python spell checking, or make it configurable with a default for Python (atm nothing this deep in the parser is configurable).

I'm a bit mixed on which direction (including "do nothing") to go.

epage avatar Feb 14 '22 19:02 epage

FYI #695 provides a new workaround for false positives

epage avatar Mar 22 '23 20:03 epage