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

Some non-words are valid only in some file types #317

Open
NotWearingPants opened this issue Sep 3, 2020 · 1 comment
Open

Some non-words are valid only in some file types #317

NotWearingPants opened this issue Sep 3, 2020 · 1 comment

Comments

@NotWearingPants
Copy link

NotWearingPants commented Sep 3, 2020

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

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 14, 2020

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 Jason3S mentioned this issue Nov 1, 2021
18 tasks
Jason3S added a commit that referenced this issue May 2, 2022
**Semi-Breaking change**

The updated python dictionary no longer sets `allowCompoundWords` to `true`. If you want the old behavior, add the following to your `cspell.json` file:

**`cspell.json`**
```json
{
    "languageSettings": [
        {
            "languageId": "python",
            "allowCompoundWords": true
        }
    ]
}
```

Note: setting `allowCompoundWords` to `true` hides many misspellings.

See: 
- streetsidesoftware/cspell-dicts#1037
- #1937
- #1626
- #1154
- #999
- #317
dgdavid added a commit to openSUSE/agama that referenced this issue Mar 14, 2023
Because it does not work as well as expected. E.g., "Hardaware" and "Needfed"
are considered right.

See streetsidesoftware/cspell#317 and
https://github.com/streetsidesoftware/cspell/labels/allowCompoundWords
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants