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

cSpell thinks accross is correct (should be across) #1154

Open
4 tasks done
noalbalint opened this issue Apr 16, 2021 · 4 comments
Open
4 tasks done

cSpell thinks accross is correct (should be across) #1154

noalbalint opened this issue Apr 16, 2021 · 4 comments

Comments

@noalbalint
Copy link

noalbalint commented Apr 16, 2021

Info

Kind of Issue

  • change in behavior (?)

Which Tool or library

  • cspell -- the command-line spelling tool

Which Version

Version:

Issue with supporting library?

  • No

OS:

  • Macos

version:

11.1

Bug Description

Describe the bug

When I write 'accross', cSpell should mark this as an error, because the correct spelling is 'across'. I have not added 'accross' to my user dictionary, so it seems to be an issue with the dictionary used by cSpell?

also looks like acccross (3c) is accepted. But not accccross, (4c) thankfully.

To Reproduce

Steps to reproduce the behavior:

  • open VScode
  • install cSpell
  • write accross somewhere in the code
  • expect to see blue underline

Expected behavior

  • no blue underline

Screenshots

Screen Shot 2021-04-16 at 10 22 15 AM

Additional context

Add any other context about the problem here.

cspell.json

If applicable, attach a copy of the cspell.json file.

Example Repository (Optional)

An example repository makes things easier to debug.

@nschonni
Copy link
Contributor

Might be an issue for the cspell-dicts repo.
You can try to run cspell trace acccross to figure out what dictionary is putting this in, but I didn't get any hits running it locally

@Jason3S Jason3S added cspell-bundled-dicts @cspell/cspell-bundled-dicts issues and removed Needs Investigating new issue labels Apr 20, 2021
@Jason3S
Copy link
Collaborator

Jason3S commented Apr 20, 2021

Thank you for bringing this up. It is the same issue as #317 and #999

@jim-hays-root
Copy link

@nschonni FYI, looks like you were looking for acccross while OP is describing accross.

@Jason3S Jason3S removed the bug label Jul 10, 2021
@Jason3S
Copy link
Collaborator

Jason3S commented Jul 10, 2021

@jim-hays-root,

The issue is with allowCompoundWords being set to true.
For some languages like CPP and Python, the dictionary definition sets it to true, (cspell-dicts/cpp allowCompoundWords).

@noalbalint can turn off this behavior by adding the following to a cspell.json file:

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

This tells the spell checker: "For all programming languages, turn off allowCompoundWords".

In a later version of CSpell, all languages will have allowCompoundWords off by default. Because it is a breaking change, it has not yet been done.

@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
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

4 participants