|
| 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 |
0 commit comments