Don't check spelling in user settings file
cSpell is checking the user settings.json file located in the AppData folder of my windows computer. This is filled with spelling errors in names of parameters and extension names that are not real words.
This file in my opinion should be out of scope for a spell checker and opt-in via dedicated property if you really want to spell check it.
I have tried to get it to ignore the complete path to the settings file and ignore just the file name. Both did nothing.
There are two options:
- Use the setting to check only workspace file:
- Upgrade to the preview 4.x version.
The spell checker checks open documents. In the past, this has never been a problem. VSCode changed its behavior a few months ago. They started using the document loading system to read configuration files. So every time VS Code loads a file in the background, it notifies the spell checker.
@Jason3S I enabled "Spell Check Only Workspace Files" and I still get spelling errors in the settings file, FYI.
@nidrissi,
Thank you. I need a bit more information.
- What version of the extension are you using? v3.x? or v4.x? If v3, please try the v4 preview.
- Which settings file are you referring to?
.vscode/settings.jsonor global settings? - Did you open the settings? Or did the error appear without the file being opened.
@Jason3S I'm using v3, global settings, the file isn't opened. I was mainly commenting to let other people who find this issue know that the first workaround may not necessarily work 🙂. Thanks.
@Jason3S I'm using v3, global settings, the file isn't opened. I was mainly commenting to let other people who find this issue know that the first workaround may not necessarily work 🙂. Thanks.
VS Code changed it behavior a few months back. It now silently opens the settings files in a hidden state in the background. This causes v3 to report on any issues found in the settings file. If this annoys you, please add **/settings.json to cSepll.ignorePaths. See https://github.com/streetsidesoftware/vscode-spell-checker/issues/3581#issuecomment-2322829714 .
@Jason3S I am using v4.0.21 of the Code Spell Checker extension, and I am still experiencing issues with the settings.json file being checked outside of the workspace.
Here is my current configuration:
"cSpell.spellCheckOnlyWorkspaceFiles": true,
"cSpell.files": ["/**"],
"cSpell.ignorePaths": [
"vscode-extension",
".vscode",
"**/settings.json"
],
I am using a profile in VS Code, which means my settings.json file is located under the path: ~/.config/Code/User/profiles/{profile-id}/settings.json.
Despite this setup, the extension still spell-checks the settings.json file in this profile directory, as shown in the attached screenshot.
Could you please clarify if additional steps are needed to prevent this, or if this is a regression? Thank you for your help!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.