Skip to content

Commit d89b646

Browse files
(AB#5132) Add cSpell configuration (#98)
This change adds configuration for cSpell based on the configuration added in MicrosoftDocs/PowerShell-Docs#9170. The `psdocs` configuration is a copy from that repository, while the scaffolded `psmodules` configuration is specific to this one. The JSON configuration in the root of the `.vscode` folder imports both definitions, merging them for checking the spelling of Markdown documents in this repository. The `crescendo`, `platyps`, `pssa`, `secretManagement`, and `secretStore` dictionaries contain minimal terms as needed. The `psdocs` dictionary in this repository should never be edited except to keep it in sync with the definition in MicrosoftDocs/PowerShell-Docs.
1 parent 633dcee commit d89b646

File tree

14 files changed

+631
-0
lines changed

14 files changed

+631
-0
lines changed

.vscode/cSpell.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"import": [
3+
"./cspell/psdocs/cspell.yaml",
4+
"./cspell/psmodules/cspell.yaml"
5+
]
6+
}

.vscode/cspell/psdocs/cspell.yaml

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
enabled: true
2+
description: >
3+
This configuration defines the default spellcheck settings for all PowerShell documentation. Where
4+
needed, other projects and subfolders can extend or override these defaults.
5+
6+
# Ensure that any comments in code files to controll cSpell are correct.
7+
validateDirectives: true
8+
9+
# These apply to all files unless otherwise specified. They're defined in NPM modules that are
10+
# available by default with the extension.
11+
dictionaries:
12+
- azureTerms
13+
- companies
14+
- filetypes
15+
- misc
16+
- powershell
17+
- softwareTerms
18+
19+
# These are locally defined. They must be specified for the document type they're used in.
20+
dictionaryDefinitions:
21+
- name: externalCommands
22+
description: >
23+
Dictionary of common commands external to PowerShell. Add entries to this dictionary for
24+
commands, services, and script keywords that are referenced in documentation but are not
25+
specific to or included in PowerShell.
26+
path: ./dictionaries/externalCommands.txt
27+
- name: fictionalCorps
28+
description: >
29+
Dictionary of fictional company names used in documentation. Add entries to this dictionary
30+
when using a valid but nonexistant fictional company or organization.
31+
path: ./dictionaries/fictionalCorps.txt
32+
- name: fileExtensions
33+
description: >
34+
Dictionary of file extensions referenced in documentation. Add entries to this dictionary
35+
when a valid file extension is marked as an unknown spelling.
36+
path: ./dictionaries/fileExtensions.txt
37+
- name: psdocs
38+
description: >
39+
General PowerShell documentation dictionary. Add entries to this dictionary for PowerShell
40+
concepts, terms, or other names. Consider submitting them to the upstream PowerShell
41+
dictionary if sensible.
42+
path: ./dictionaries/psdocs.txt
43+
- name: pwshAliases
44+
description: >
45+
Dictionary of PowerShell aliases. Add entries to this dictionary for command and parameter
46+
aliases to keep the main dictionary easier to use.
47+
path: ./dictionaries/pwshAliases.txt
48+
49+
# Defining patterns here makes it easier to understand the definitions for the ignore and include
50+
# pattern lists (`*RegExpList`). Also allows us to document these patterns to some degree.
51+
patterns:
52+
- name: domain-azure-edge
53+
description: Ignore misspellings caused by lowercase domain names for Azure edge domains.
54+
pattern: /\S+\.azureedge\.net/
55+
- name: domain-windows-blob
56+
description: Ignore misspellings caused by lowercase domain names Windows blob storage domains
57+
pattern: /\S+\.blob\.core\.windows\.net/
58+
- name: domain-gallery
59+
description: Ignore segments preceeding or following the powershellgallery domain name.
60+
pattern: /(\S+\.)?powershellgallery\.com(\S+)?/
61+
- name: domains
62+
description: Ignore apparent misspellings as components of well-known domain name.
63+
pattern:
64+
- domain-azure-edge
65+
- domain-gallery
66+
- domain-windows-blob
67+
68+
- name: markdown-code-block-output
69+
description: Ignore text in output code blocks.
70+
pattern: '/(?:```[oO]utput[\s\S]*?```)/g'
71+
- name: markdown-code-block-syntax
72+
description: Ignore text in output code blocks.
73+
pattern: '/(?:```[sS]yntax[\s\S]*?```)/g'
74+
- name: markdown-code-blocks
75+
description: Don't check spelling in output or syntax blocks.
76+
pattern:
77+
- markdown-code-block-output
78+
- markdown-code-block-syntax
79+
80+
- name: markdown-link-reference
81+
description: Matches 'foobar' in '[foo bar][foobar]'
82+
pattern: /(?<=\])\[[^\]]+\]/
83+
- name: markdown-link-inline
84+
description: Matches '/foo/bar' in '[foo bar](/foo/bar)'
85+
pattern: '/(?<=\])\([^\)]+\)/'
86+
- name: markdown-link-definition
87+
description: "Matches '/foo/bar' in '[foobar]: /foo/bar'"
88+
pattern: '/(?<=\]:\s)(\s*((https?:)?|\/|\.{1,2}))(\/\S+)/'
89+
- name: markdown-links
90+
description: Don't check link definitions or references.
91+
pattern:
92+
- markdown-link-inline
93+
- markdown-link-reference
94+
- markdown-link-definition
95+
96+
- name: registry-paths
97+
description: Ignore Windows registry paths
98+
pattern: /(HK(CR|CU|LM))(:\S*)?/
99+
100+
- name: wildcard-fragment-prefix
101+
description: Ignore misspellings caused by partial words with a wildcard at the start.
102+
pattern: '/[^\*]\*\w+/'
103+
- name: wildcard-fragment-suffix
104+
description: Ignore misspellings caused by partial words with a wildcard at the end.
105+
pattern: '/\w+\*[^\*]/'
106+
- name: wildcard-fragments
107+
pattern:
108+
- wildcard-fragment-prefix
109+
- wildcard-fragment-suffix
110+
111+
# Any patterns listed here are ignored for spellcheck.
112+
#
113+
# We ignore the URLs for inline markdown links, Markdown link references, and Markdown link
114+
# reference definitions because these will otherwise be very noisy and they're not displayed to
115+
# readers anyway.
116+
#
117+
# We ignore the spelling for all text in output code blocks for Markdown files because that text
118+
# represents output from real commands and any spelling errors are not a fault in the documentation.
119+
#
120+
# We ignore registry paths, wildcard fragments, and components of well-known domains because those
121+
# are intentionally or uncontrollably downcased or "incorrect" spellings.
122+
ignoreRegExpList:
123+
- domains
124+
- markdown-code-blocks
125+
- markdown-links
126+
- registry-paths
127+
- wildcard-fragments
128+
129+
# The default locale for this documentation is US English.
130+
language: 'en,en-US'
131+
132+
# These settings are applied to combinations of language (file type) and locale. For any given file
133+
# and locale, all matching dictionaries are applied.
134+
languageSettings:
135+
# Any file written in English
136+
- languageId: '*'
137+
locale: en
138+
dictionaries:
139+
- wordsEn
140+
# Any file written in US English
141+
- languageId: '*'
142+
locale: en-US
143+
dictionaries:
144+
- wordsEn
145+
# Any file written in British English
146+
- languageId: '*'
147+
locale: en-GB
148+
dictionaries:
149+
- wordsEnGb
150+
# Any Markdown file
151+
- languageId: markdown
152+
locale: '*'
153+
dictionaries:
154+
- externalCommands
155+
- fictionalCorps
156+
- fileExtensions
157+
- psdocs
158+
- pwshAliases
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
AcroRd32
2+
Appinfo
3+
appwiz
4+
audiodg
5+
Audiosrv
6+
azurecli
7+
ccmsetup
8+
cd
9+
certreq
10+
chdir
11+
conhost
12+
csrss
13+
distro
14+
dpkg
15+
elif
16+
filesrv
17+
ftype
18+
gedit
19+
iexplore
20+
iisadmin
21+
Intune
22+
kubectl
23+
LanmanServer
24+
LanmanWorkstation
25+
LSASRV
26+
lsass
27+
makecert
28+
mkdir
29+
mscorlib
30+
msdtc
31+
msseces
32+
netcoreapp
33+
Netlogon
34+
netsh
35+
netsvcs
36+
Pandoc
37+
rdpclip
38+
RSAT
39+
rstrui
40+
setenv
41+
svchost
42+
SysmonLog
43+
tlntsvr
44+
w3wp
45+
WFDBG
46+
winget
47+
Winlogon
48+
Winmgmt
49+
winver
50+
Winword
51+
WLIDSVC
52+
xattr
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Adatum
2+
Contoso
3+
Fabrikam
4+
Humongous
5+
Lamna
6+
Lucerne
7+
Margie
8+
Munson
9+
Northwind
10+
Proseware
11+
Relecloud
12+
Southridge
13+
Tailspin
14+
Tailwind
15+
Trey
16+
VanArsdel
17+
Wingtip
18+
Woodgrove
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
adml
2+
admx
3+
asmx
4+
bmil
5+
cdxml
6+
dylib
7+
evtx
8+
maml
9+
mogg
10+
msix

0 commit comments

Comments
 (0)