Last active
March 26, 2025 08:47
-
-
Save r3code/21d1e9a3f862ad865808f07225b59068 to your computer and use it in GitHub Desktop.
Visual Studio Code - Code Spell Checker config for GoLang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Add to VS Code settings.js file | |
"cSpell.languageSettings": [ | |
// GoLang settings | |
{ | |
"languageId": "go", | |
// Turn off compound words, because it is only checking strings. | |
"allowCompoundWords": false, | |
// Only check comments and strings | |
"includeRegExpList": [ | |
"CStyleComment", | |
"string" | |
], | |
// Exclude imports, because they are also strings. | |
"ignoreRegExpList": [ | |
// ignore mulltiline imports | |
"import\\s*\\((.|[\r\n])*?\\)", | |
// ignore single line imports | |
"import\\s*.*\".*?\"", | |
// ignore go generate directive | |
"//\\s*go:generate.*", | |
// ignore nolint directive | |
"//\\s*nolint:.*" | |
], | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment