weixin_39593744
weixin_39593744
2020-12-01 19:43

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: VSCode output Command-line 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"

该提问来源于开源项目:streetsidesoftware/cspell

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39722917 weixin_39722917 5月前

    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.

    点赞 评论 复制链接分享
  • weixin_39722917 weixin_39722917 5月前

    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.

    点赞 评论 复制链接分享
  • weixin_39884144 weixin_39884144 5月前

    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.

    点赞 评论 复制链接分享
  • weixin_39689347 weixin_39689347 5月前

    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.

    点赞 评论 复制链接分享
  • weixin_39722917 weixin_39722917 5月前

    allowCompundWords is off by default. This is intentional. It has multiple issues: 1. it hides spelling errors because it allows any combination of words to be put together. 2. it is slower when checking because it has to search for all possible word combinations.

    点赞 评论 复制链接分享
  • weixin_39758229 weixin_39758229 5月前

    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.

    点赞 评论 复制链接分享

相关推荐