Skip to content

Commit

Permalink
fix: Enable terraform files by default. (#3051)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Mar 21, 2024
1 parent 9f54bb9 commit 2747ee8
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 84 deletions.
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

0 comments on commit 2747ee8

Please sign in to comment.