-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add a dictionary for Docker keywords (#1117)
* feat: Add a dictionary for Docker keywords Co-authored-by: Jason Dent <Jason3S@users.noreply.github.com>
- Loading branch information
1 parent
9239b2c
commit 50ee3c8
Showing
11 changed files
with
186 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2022 Jason Dent <jason@streetsidesoftware.nl> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Cspell Docker Dictionary | ||
|
||
Docker dictionary for cspell. | ||
|
||
This is a pre-built dictionary for use with cspell. | ||
|
||
## Installation | ||
|
||
Global Install and add to cspell global settings. | ||
|
||
```sh | ||
npm install -g @cspell/dict-docker | ||
cspell link add @cspell/dict-docker | ||
``` | ||
|
||
## Uninstall from cspell | ||
|
||
```sh | ||
cspell link remove @cspell/dict-docker | ||
``` | ||
|
||
## Manual Installation | ||
|
||
The `cspell-ext.json` file in this package should be added to the import section in your cspell.json file. | ||
|
||
```javascript | ||
{ | ||
// … | ||
"import": ["@cspell/dict-docker/cspell-ext.json"], | ||
// … | ||
} | ||
``` | ||
|
||
## Building | ||
|
||
Building is only necessary if you want to modify the contents of the dictionary. Note: Building will take a few minutes for large files. | ||
|
||
```sh | ||
npm run build | ||
``` | ||
|
||
## License | ||
|
||
MIT | ||
|
||
> Some packages may have other licenses included. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// cSpell Settings | ||
{ | ||
"id": "docker", | ||
"name": "Docker Dictionary", | ||
"description": "Docker dictionary for cspell.", | ||
"readonly": true, | ||
// List of dictionary files to add to the global list of dictionaries | ||
"dictionaryDefinitions": [ | ||
{ | ||
"name": "docker", | ||
"path": "./docker-words.txt.gz", | ||
"description": "Docker 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 `local` | ||
"languageSettings": [ | ||
{ | ||
// VSCode languageId. i.e. typescript, java, go, cpp, javascript, markdown, latex | ||
// * will match against any file type. | ||
"languageId": "dockerfile", | ||
// Language local. i.e. en-US, de-AT, or ru. * will match all locals. | ||
// Multiple locals can be specified like: "en, en-US" to match both English and English US. | ||
"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": ["docker"], | ||
// Dictionary definitions can also be supplied here. They are only used iff "languageId" and "locale" match. | ||
"dictionaryDefinitions": [] | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"version": "0.2", | ||
"files": [ | ||
"**/*.{md,txt}" | ||
], | ||
"dictionaries": [ | ||
"docker" | ||
], | ||
"import": [ | ||
"./cspell-ext.json" | ||
], | ||
"words": [ | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ADD | ||
ARG | ||
CMD | ||
COPY | ||
ENTRYPOINT | ||
ENV | ||
EXPOSE | ||
FROM | ||
HEALTHCHECK | ||
LABEL | ||
MAINTAINER | ||
ONBUILD | ||
RUN | ||
SHELL | ||
STOPSIGNAL | ||
USER | ||
VOLUME | ||
WORKDIR |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "@cspell/dict-docker", | ||
"version": "1.0.0", | ||
"description": "Docker dictionary for cspell.", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"exports": { | ||
".": "./cspell-ext.json", | ||
"./cspell": "./cspell-ext.json", | ||
"./cspell-ext.json": "./cspell-ext.json" | ||
}, | ||
"scripts": { | ||
"build": "cspell-tools-cli compile \"docker-words.txt\" -o .", | ||
"test": "head -n 100 \"docker-words.txt\" | cspell -v -c ./cspell-ext.json \"--local=*\" \"--languageId=dockerfile\" stdin", | ||
"prepublishOnly": "echo pre-publish", | ||
"prepare": "yarn run build" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/streetsidesoftware/cspell-dicts.git" | ||
}, | ||
"keywords": [ | ||
"cspell", | ||
"docker", | ||
"dictionary", | ||
"spelling" | ||
], | ||
"author": "Jason Dent", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/streetsidesoftware/cspell-dicts/issues" | ||
}, | ||
"homepage": "https://github.com/streetsidesoftware/cspell-dicts/blob/main/dictionaries/docker#readme", | ||
"files": [ | ||
"docker-words.txt.gz", | ||
"cspell-ext.json" | ||
] | ||
} |