VSCode plugin reports more errors than command line for same file
When I run cspell I always get more errors reported in VSCode than I do on the command-line, whether the command-line includes wildcards or just a single file. The VSCode list is always a superset of the command-line list.
Example:
VSCode Output:
Command-line Output:

Further notes:
- I have just a single cspell.json file in my project, at the root, which is the directory from which I run the command-line invocation.
- If I add an exclusion to that cspell.json file, it is immediately reflect in VSCode--that error goes away. And if I rerun cspell on the command-line, that error goes away.
- Running on macOS High Sierra
- Cspell command-line version: 3.0.2
- VSCode plugin version: "Code Spell Checker 1.6.10"
Thank you. I'll see if I can reproduce the issue.
Just so you know, the defaults for the VS Code are slightly different than the command line. But it shouldn't make a big difference.
It is acting line the command line version is thinking allowCompoundWords is true. It that setting in one of your config files?
The command line version cannot pick up the settings from VS Code.
Am seeing something similar and mine too was down to my setting of allowCompoundWords=true being ignored (in VSCode only) from a config file that I was sharing between command line and VSCode. Workaround was that I had to set this explicitly within VSCode.
I think I encountered the same bug myself and I ended up doing the same thing. This make me wonder if it would not be better to change the default to have allowCompoundWords default as true instead of false as this would make life much easier for people if vscode defaults would be more in-sync with cli settings.
allowCompundWords is off by default. This is intentional.
It has multiple issues:
- it hides spelling errors because it allows any combination of words to be put together.
- it is slower when checking because it has to search for all possible word combinations.
I have default settings for plugin, and cspell.json with some dictionary words list. The word guid is not in the list, and for some reason vs code reports this word as an error when any file with it is opened, but cli tool detects no errors at all. I tried to reproduce default plugin settings in cspell.json but with no luck.