cspell icon indicating copy to clipboard operation
cspell copied to clipboard

Some non-words are valid only in some file types

Open NotWearingPants opened this issue 4 years ago • 1 comments

For some reason cspell doesn't flag some non-words, but only on certain languages, and they aren't in any of the dictionaries.

Spell check the following words with cspell --languageId python:

altough
alltough
alatough
blablala
lablala

Although all of these words are not real words, cspell doesn't flag them as wrong (at least for me). If you try the word blablabla for example, it does flag it is wrong, so it does go over these words.

This also happens in C, C++, and C#, but not in JS for example.

I don't have a cspell.json file, and I've searched for these words in all of the dictionaries but couldn't find them. So I'm not sure what's causing this, hopefully this reproduces for others as well.

cspell version: 4.1.0

NotWearingPants avatar Sep 03 '20 03:09 NotWearingPants

It is because compound words is turned on in Python.

To turn it off add the following to a cspell.json file:

   "languageSettings": [
        {
            "languageId": "python",
            "allowCompoundWords": false
        }
    ]

entire cspell.json could be:

cspell.json.txt

Jason3S avatar Sep 14 '20 07:09 Jason3S