Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"wont" should probably be an error #1466

Open
Nightblade opened this issue Sep 18, 2022 · 5 comments
Open

"wont" should probably be an error #1466

Nightblade opened this issue Sep 18, 2022 · 5 comments

Comments

@Nightblade
Copy link
Contributor

"wont" is currently considered correct by four dictionaries according to the trace I just ran (see below).

I think most occurrences of "wont" are going to be misspellings of "won't", especially in code. "Wont" has a different meaning than "won't", is rarely used, and is generally considered to be an archaic word.

 

Word F Dictionary           Dictionary Location           
wont * cpp                  C:\Progs\Nodist\bin\node_modules\cspell\node_modules\@cspell\dict-cpp\cpp.txt.gz
wont * en_us*               C:\Progs\Nodist\bin\node_modules\cspell\node_modules\@cspell\dict-en_us\en_US.trie.gz
wont * en-gb*               C:\Progs\Nodist\bin\node_modules\cspell\node_modules\@cspell\dict-en-gb\en_GB.trie.gz
wont * python               C:\Progs\Nodist\bin\node_modules\cspell\node_modules\@cspell\dict-python\python.txt.gz
@Jason3S
Copy link
Collaborator

Jason3S commented Sep 18, 2022

@Nightblade,

I believe that the python and cpp are incorrect.

The difficult part is what to do about very rare words that are commonly misused in place of a common word. wont vs won't is a perfect example.

My proposal is to create a typos dictionary for these mistakes.

It would be included by default to flag issues that you have pointed out, but could be easily turned off by those who want to "full" English language.

@Nightblade
Copy link
Contributor Author

Hi @Jason3S,

Your proposal sounds good.

As a general rule I think software should always default to "make noise" rather than "silently continue" when there is sufficient doubt. Wont is a good example: I would never have even known it was there in the code if I hadn't specifically searched for it, and 99% of the time it's a misspelling.

@calvinballing
Copy link
Collaborator

Would the typos or common-typos dictionary just reuse the existing forbidden words mechanism?

@Jason3S
Copy link
Collaborator

Jason3S commented Oct 29, 2022

@calvinballing,

Here is an RFC exploring the issue: cspell/rfc/rfc-0001 suggestions

@Nightblade
Copy link
Contributor Author

Nightblade commented Dec 20, 2022

@Jason3S

Should I add cant here or open a new ticket?

Word F Dictionary           Dictionary Location   
cant * cpp                  @cspell\dict-cpp\cpp.txt.gz
cant * dotnet               @cspell\dict-dotnet\dotnet.txt.gz
cant * en_us*               @cspell\dict-en_us\en_US.trie.gz       
cant * en-gb*               @cspell\dict-en-gb\en_GB.trie.gz       

Oh, I just noticed shes, heres, somebodys and someones are considered correct spelling too:

Word F Dictionary           Dictionary Location   
shes * en_us*               @cspell\dict-en_us\en_US.trie.gz

Also, now that I've had time to think about the typos dictionary as you described above, I'm of the strong opinion that it is unnecessary. If there is (reasonable) doubt about a word's spelling, it should simply be left out of the dictionary/dictionaries. Then when (if) the word is next flagged, it can be dealt with by the user using existing work-flows. Accordingly, wont would be removed, and I'm very comfortable with that for reasons I've already mentioned.

(Happy Holidays, and sorry about the wall-of-text!)

edit: add heres
edit: add somebodys and someones

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

No branches or pull requests

3 participants