-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
156 additions
and
47 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
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 |
---|---|---|
|
@@ -29,12 +29,16 @@ A Spell Checker for Code! | |
cspell was initially built as the spell checking service for the [spell checker extension](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) for | ||
[Visual Studio Code](https://code.visualstudio.com/). | ||
|
||
## cspell for enterprise | ||
## CSpell for Enterprise | ||
|
||
<!--- @@inject: ../../static/tidelift.md ---> | ||
|
||
Available as part of the Tidelift Subscription. | ||
|
||
The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) | ||
|
||
<!--- @@inject-end: ../../static/tidelift.md ---> | ||
|
||
## Installation | ||
|
||
```sh | ||
|
@@ -45,9 +49,19 @@ npm install -g cspell | |
|
||
There is a docker image at [Packages for cspell](https://github.com/streetsidesoftware/cspell-cli/pkgs/container/cspell). | ||
|
||
`cspell` commands below can be run by replacing `cspell` with: `docker run -v -i -t $PWD:/workdir ghcr.io/streetsidesoftware/cspell:latest` | ||
`cspell` commands below can be run by replacing | ||
|
||
Example: | ||
``` | ||
cspell | ||
``` | ||
|
||
with: | ||
|
||
``` | ||
docker run -v -i -t $PWD:/workdir ghcr.io/streetsidesoftware/cspell:latest | ||
``` | ||
|
||
**Example:** | ||
|
||
```sh | ||
docker run -v -i -t $PWD:/workdir ghcr.io/streetsidesoftware/cspell:latest lint --help | ||
|
@@ -310,7 +324,7 @@ The concept is simple, split camelCase and snake_case words before checking them | |
It is possible to add spell check settings into your source code. | ||
This is to help with file specific issues that may not be applicable to the entire project. | ||
|
||
All settings are prefixed with `cSpell:` or `spell-checker:`. | ||
All settings are prefixed with `cspell:` or `spell-checker:`. | ||
|
||
- `disable` -- turn off the spell checker for a section of code. | ||
- `enable` -- turn the spell checker back on after it has been turned off. | ||
|
@@ -327,26 +341,26 @@ It is possible to disable / enable the spell checker by adding comments to your | |
|
||
#### Disable Checking | ||
|
||
- `/* cSpell:disable */` | ||
- `/* cspell:disable */` | ||
- `/* spell-checker: disable */` | ||
- `/* spellchecker: disable */` | ||
- `// cspell:disable-line` -- disables checking for the current line. | ||
- `/* cspell:disable-next-line */` -- disables checking till the end of the next line. | ||
|
||
<!--- cSpell:enable --> | ||
<!--- cspell:enable --> | ||
|
||
#### Enable Checking | ||
|
||
- `/* cSpell:enable */` | ||
- `/* cspell:enable */` | ||
- `/* spell-checker: enable */` | ||
- `/* spellchecker: enable */` | ||
|
||
#### Example | ||
|
||
```javascript | ||
// cSpell:disable | ||
// cspell:disable | ||
const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm']; | ||
/* cSpell:enable */ | ||
/* cspell:enable */ | ||
|
||
const words = ['zaallano', 'wooorrdd', 'zzooommmmmmmm']; // cspell:disable-line disables this entire line | ||
|
||
|
@@ -363,7 +377,7 @@ var liep = 1; | |
/* cspell:disable */ | ||
// It is still disabled | ||
|
||
// cSpell:enable | ||
// cspell:enable | ||
// It is now enabled | ||
|
||
const str = 'goededag'; // <- will be flagged as an error. | ||
|
@@ -376,15 +390,15 @@ const str = 'goededag'; // <- will be flagged as an error. | |
const str = 'goedemorgen'; // <- will NOT be flagged as an error. | ||
``` | ||
|
||
<!--- cSpell:enable --> | ||
<!--- cspell:enable --> | ||
|
||
### Ignore | ||
|
||
_Ignore_ allows you the specify a list of words you want to ignore within the document. | ||
|
||
```javascript | ||
// cSpell:ignore zaallano, wooorrdd | ||
// cSpell:ignore zzooommmmmmmm | ||
// cspell:ignore zaallano, wooorrdd | ||
// cspell:ignore zzooommmmmmmm | ||
const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm']; | ||
``` | ||
|
||
|
@@ -395,7 +409,7 @@ const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm']; | |
The _words_ list allows you to add words that will be considered correct and will be used as suggestions. | ||
|
||
```javascript | ||
// cSpell:words woorxs sweeetbeat | ||
// cspell:words woorxs sweeetbeat | ||
const companyName = 'woorxs sweeetbeat'; | ||
``` | ||
|
||
|
@@ -406,8 +420,8 @@ const companyName = 'woorxs sweeetbeat'; | |
In some programing language it is common to glue words together. | ||
|
||
```c | ||
// cSpell:enableCompoundWords | ||
char * errormessage; // Is ok with cSpell:enableCompoundWords | ||
// cspell:enableCompoundWords | ||
char * errormessage; // Is ok with cspell:enableCompoundWords | ||
int errornumber; // Is also ok. | ||
``` | ||
|
||
|
@@ -417,7 +431,7 @@ The last setting in the file determines the value for the entire file. | |
### Excluding and Including Text to be checked. | ||
|
||
By default, the entire document is checked for spelling. | ||
`cSpell:disable`/`cSpell:enable` above allows you to block off sections of the document. | ||
`cspell:disable`/`cspell:enable` above allows you to block off sections of the document. | ||
`ignoreRegExp` and `includeRegExp` give you the ability to ignore or include patterns of text. | ||
By default the flags `gim` are added if no flags are given. | ||
|
||
|
@@ -430,17 +444,17 @@ The spell checker works in the following way: | |
#### Exclude Example | ||
|
||
```javascript | ||
// cSpell:ignoreRegExp 0x[0-9a-f]+ -- will ignore c style hex numbers | ||
// cSpell:ignoreRegExp /0x[0-9A-F]+/g -- will ignore upper case c style hex numbers. | ||
// cSpell:ignoreRegExp g{5} h{5} -- will only match ggggg, but not hhhhh or 'ggggg hhhhh' | ||
// cSpell:ignoreRegExp g{5}|h{5} -- will match both ggggg and hhhhh | ||
// cSpell:ignoreRegExp /g{5} h{5}/ -- will match 'ggggg hhhhh' | ||
/* cSpell:ignoreRegExp /n{5}/ -- will NOT work as expected because of the ending comment -> */ | ||
// cspell:ignoreRegExp 0x[0-9a-f]+ -- will ignore c style hex numbers | ||
// cspell:ignoreRegExp /0x[0-9A-F]+/g -- will ignore upper case c style hex numbers. | ||
// cspell:ignoreRegExp g{5} h{5} -- will only match ggggg, but not hhhhh or 'ggggg hhhhh' | ||
// cspell:ignoreRegExp g{5}|h{5} -- will match both ggggg and hhhhh | ||
// cspell:ignoreRegExp /g{5} h{5}/ -- will match 'ggggg hhhhh' | ||
/* cspell:ignoreRegExp /n{5}/ -- will NOT work as expected because of the ending comment -> */ | ||
/* | ||
cSpell:ignoreRegExp /q{5}/ -- will match qqqqq just fine but NOT QQQQQ | ||
cspell:ignoreRegExp /q{5}/ -- will match qqqqq just fine but NOT QQQQQ | ||
*/ | ||
// cSpell:ignoreRegExp /[^\s]{40,}/ -- will ignore long strings with no spaces. | ||
// cSpell:ignoreRegExp Email -- this will ignore email like patterns -- see Predefined RegExp expressions | ||
// cspell:ignoreRegExp /[^\s]{40,}/ -- will ignore long strings with no spaces. | ||
// cspell:ignoreRegExp Email -- this will ignore email like patterns -- see Predefined RegExp expressions | ||
var encodedImage = 'HR+cPzr7XGAOJNurPL0G8I2kU0UhKcqFssoKvFTR7z0T3VJfK37vS025uKroHfJ9nA6WWbHZ/ASn...'; | ||
var email1 = '[email protected]'; | ||
var email2 = '<[email protected]>'; | ||
|
@@ -453,8 +467,8 @@ var email2 = '<[email protected]>'; | |
In general you should not need to use `includeRegExp`. But if you are mixing languages then it could come in helpful. | ||
|
||
```Python | ||
# cSpell:includeRegExp #.* | ||
# cSpell:includeRegExp ("""|''')[^\1]*\1 | ||
# cspell:includeRegExp #.* | ||
# cspell:includeRegExp ("""|''')[^\1]*\1 | ||
# only comments and block strings will be checked for spelling. | ||
def sum_it(self, seq): | ||
"""This is checked for spelling""" | ||
|
@@ -471,7 +485,7 @@ def sum_it(self, seq): | |
The _dictionaries_ list allows you to specify dictionaries to use for the file. | ||
|
||
```javascript | ||
// cSpell:dictionaries lorem-ipsum | ||
// cspell:dictionaries lorem-ipsum | ||
const companyName = 'Lorem ipsum dolor sit amet'; | ||
``` | ||
|
||
|
@@ -682,7 +696,7 @@ The number of `!`s is important. | |
|
||
## LanguageSettings | ||
|
||
The Language Settings allow configuration to be based upon the programming language and/or the e. | ||
The Language Settings allow configuration to be based upon the programming language and/or the locale. | ||
There are two selector fields `locale` and `languageId`. | ||
|
||
- `languageId` defines which programming languages to match against. | ||
|
@@ -749,13 +763,13 @@ Brought to you by <a href="https://streetsidesoftware.com" title="Street Side So | |
<!--- @@inject-end: ../../static/footer.md ---> | ||
|
||
<!--- | ||
cSpell:disableCompoundWords | ||
cSpell:ignore compoundwords stringlength errornumber | ||
cSpell:ignore jsja goededag alek wheerd behaviour tsmerge QQQQQ ncode | ||
cSpell:includeRegExp Everything | ||
cSpell:ignore hte variabele alinea | ||
cSpell:ignore mkdirp githubusercontent streetsidesoftware vsmarketplacebadge visualstudio | ||
cSpell:words Verdana | ||
cSpell:ignore ieeees beees treeees | ||
cSpell:ignore amet | ||
cspell:disableCompoundWords | ||
cspell:ignore compoundwords stringlength errornumber | ||
cspell:ignore jsja goededag alek wheerd behaviour tsmerge QQQQQ ncode | ||
cspell:includeRegExp Everything | ||
cspell:ignore hte variabele alinea | ||
cspell:ignore mkdirp githubusercontent streetsidesoftware vsmarketplacebadge visualstudio | ||
cspell:words Verdana | ||
cspell:ignore ieeees beees treeees | ||
cspell:ignore amet | ||
--> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Available as part of the Tidelift Subscription. | ||
|
||
The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) |