Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Enable terraform files by default. #3051

Merged
merged 2 commits into from Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 5 additions & 23 deletions dictionaries/terraform/cspell-ext.json
@@ -1,44 +1,26 @@
// cSpell Settings
{
"id": "terraform",
"version": "0.2",
"name": "Terraform",
"description": "Terraform dictionary for cspell.",
"readonly": true,
// List of dictionary files to add to the global list of dictionaries
"dictionaryDefinitions": [
{
"name": "terraform",
"path": "./dict/terraform.txt",
"description": "Terraform dictionary for cspell."
}
],
// Dictionaries to always be used.
// Generally left empty
"dictionaries": [],
// Language Rules to apply to matching files.
// Files are matched on `languageId` and `locale`
"languageSettings": [
{
// VSCode languageId. i.e. typescript, java, go, cpp, javascript, markdown, latex
// * will match against any file type.
"languageId": "terraform",
// Language locale. i.e. en-US, de-AT, or ru. * will match all locales.
// Multiple locales can be specified like: "en, en-US" to match both English and English US.
"languageId": "terraform,tfvars",
"locale": "*",
// By default the whole text of a file is included for spell checking
// Adding patterns to the "includeRegExpList" to only include matching patterns
"includeRegExpList": [],
// To exclude patterns, add them to "ignoreRegExpList"
"ignoreRegExpList": [],
// regex patterns than can be used with ignoreRegExpList or includeRegExpList
// Example: "pattern": [{ "name": "mdash", "pattern": "—" }]
// This could be included in "ignoreRegExpList": ["mdash"]
"patterns": [],
// List of dictionaries to enable by name in `dictionaryDefinitions`
"dictionaries": ["terraform"],
// Dictionary definitions can also be supplied here. They are only used iff "languageId" and "locale" match.
"dictionaryDefinitions": []
"dictionaries": ["terraform"]
}
]
],
"enableFiletypes": ["terraform"],
"overrides": [{ "filename": "**/*.tf", "languageId": "terraform" }]
}
2 changes: 1 addition & 1 deletion dictionaries/terraform/cspell-tools.config.yaml
Expand Up @@ -7,6 +7,6 @@ targets:
maxDepth: 1 # This is set to 1 to prevent initial builds from taking too long.
format: 'plaintext'
targetDirectory: './dict'
generateNonStrict: 'false'
generateNonStrict: false
compress: false
checksumFile: true
10 changes: 6 additions & 4 deletions dictionaries/terraform/cspell.json
Expand Up @@ -3,10 +3,12 @@
"files": [
"**/*.{md,txt}"
],
"dictionaries": [
"terraform"
],
"import": [
"./cspell-ext.json"
]
],
"overrides": [{
"filename": "**/*.{md,txt}",
"dictionaries": ["terraform"]
}],
"words": ["tfvars"]
}
7 changes: 4 additions & 3 deletions dictionaries/terraform/package.json
@@ -1,8 +1,7 @@
{
"name": "@cspell/dict-terraform",
"version": "1.0.0",
"description": "Terraform dictionary for cspell. -- Private until verified",
"private": true,
"description": "Terraform dictionary for cspell.",
"publishConfig": {
"access": "public"
},
Expand All @@ -13,7 +12,9 @@
},
"scripts": {
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 cspell-tools-cli build",
"test": "head -n 1000 \"src/terraform.txt\" | cspell -v -c ./cspell-ext.json \"--locale=*\" \"--languageId=terraform\" stdin",
"test": "pnpm run test:words && pnpm run test:samples",
"test:samples": "cspell samples",
"test:words": "head -n 1000 \"src/terraform.txt\" | cspell -c ./cspell-ext.json \"--locale=*\" \"--languageId=terraform\" stdin",
"prepublishOnly": "echo OK",
"prepare:dictionary": "pnpm run build"
},
Expand Down
3 changes: 3 additions & 0 deletions dictionaries/terraform/samples/cspell.json
@@ -0,0 +1,3 @@
{
"import": "../cspell-ext.json"
}
1 change: 1 addition & 0 deletions dictionaries/terraform/samples/prod.tfvars
@@ -0,0 +1 @@
instance_type = "t2.micro"
52 changes: 0 additions & 52 deletions dictionaries/terraform/terraform.txt

This file was deleted.

Expand Up @@ -7,6 +7,6 @@ targets:
maxDepth: 1 # This is set to 1 to prevent initial builds from taking too long.
format: '<%= format %>'
targetDirectory: './dict'
generateNonStrict: '<%= generateNonStrict %>'
generateNonStrict: <%= generateNonStrict %>
compress: false
checksumFile: true