-
My language is Terraform. So all of these are valid comments...
I can't quite come up with a combination of ignore and include regex to check only comments. Any ideas? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
Jason3S
Oct 2, 2021
Replies: 1 comment 2 replies
-
Try adding the following to your project:
{
"patterns": [
{
"name": "terraform.comment.single-line",
"description": "Matches Terraform single-line comments",
"pattern": "/(#|\\/\\/).*/g"
},
{
"name": "terraform.comment",
"description": "Matches Terraform comments",
"pattern": ["CStyleComment", "terraform.comment.single-line"]
}
],
"languageSettings": [
{
"languageId": "terraform,tf",
"includeRegExpList": ["terraform.comment"]
}
],
"overrides": [
{
"filename": ["*.tf", "*.tfvars"],
"languageId": "terraform"
}
],
"ignoreWords": ["tfvars"],
"enableFiletypes": ["tf", "terraform"]
} If you run: npx cspell check <path to your terraform file> |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Jason3S
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try adding the following to your project:
cspell.json