Skip to content

Commit

Permalink
Update set of spellcheck patterns (#444)
Browse files Browse the repository at this point in the history
Use the current set of patterns

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 authored Mar 15, 2023
1 parent cd8406f commit 64285c4
Show file tree
Hide file tree
Showing 6 changed files with 177 additions and 20 deletions.
22 changes: 11 additions & 11 deletions .github/actions/spelling/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# check-spelling/check-spelling configuration

File | Purpose | Format | Info
-|-|-|-
[dictionary.txt](dictionary.txt) | Replacement dictionary (creating this file will override the default dictionary) | one word per line | [dictionary](https://github.com/check-spelling/check-spelling/wiki/Configuration#dictionary)
[allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow)
[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject)
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only)
[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)
| File | Purpose | Format | Info |
| -------------------------------------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [dictionary.txt](dictionary.txt) | Replacement dictionary (creating this file will override the default dictionary) | one word per line | [dictionary](https://github.com/check-spelling/check-spelling/wiki/Configuration#dictionary) |
| [allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow) |
| [reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject) |
| [excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes) |
| [only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only) |
| [patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns) |
| [line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns) |
| [expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect) |
| [advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice) |

Note: you can replace any of these files with a directory by the same name (minus the suffix)
and then include multiple files inside that directory (with that suffix) to merge multiple files together.
14 changes: 6 additions & 8 deletions .github/actions/spelling/advice.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@
<details><summary>If the flagged items are false positives</summary>

If items relate to a ...
* binary file (or some other file you wouldn't want to check at all).

- binary file (or some other file you wouldn't want to check at all).

Please add a file path to the `excludes.txt` file matching the containing file.

File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
File paths are Perl 5 Regular Expressions - you can [test](https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](../tree/HEAD/README.md) (on whichever branch you're using).

* well-formed pattern.
- well-formed pattern.

If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
try adding it to the `patterns.txt` file.

Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
Patterns are Perl 5 Regular Expressions - you can [test](https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.

Note that patterns can't match multiline strings.

Expand Down
1 change: 0 additions & 1 deletion .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cdef
GOBIN
iex
134 changes: 134 additions & 0 deletions .github/actions/spelling/line_forbidden.patterns
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
\bSaas\b
\bsaas\b

# s.b. Docker Hub
\bDockerHub\b
\bDockerhub\b

# s.b. REST API
\bRest API\b
\brest API\b
Expand All @@ -25,15 +29,26 @@
# s.b. DevSecOps
\bDevsecops\b

# s.b. on-premises
\bon-premise\b

#
# Product Names
#

# s.b. CentOS
\bCentos\b
\bCent OS\b
\bcentOS\b

# s.b. macOS
\bOS X\b
\bMacOS\b
\bMac OS\b

# s.b. Okta
\bOcta\b

# s.b. Elasticsearch
\bElasticSearch\b

Expand Down Expand Up @@ -90,9 +105,48 @@
# s.b. JavaScript
\bJavascript\b

# s.b. OpenSSL
\bOpenssl\b
\bopenSSL\b

#
# Microsoft Products
#

# s.b. Microsoft
\bMicroSoft\b

# s.b. Windows Server
\bWindows server\b

# s.b. Team Foundation Server
\bTeam foundation server\b
\bteam foundation server\b

# s.b. Active Directory
\bActive directory\b
\bactive directory\b

# s.b. Group Policy Object
\bGroup policy object\b
\bgroup policy object\b
\bGroup Policy object\b

#
# VMware Product
#

# s.b. VMware
\bVmware\b
\bVMWare\b

# s.b. vCenter
\bVcenter\b
\bVCenter\b

# s.b. ESXi
\bEsxi\b

#
# AWS Products
#
Expand Down Expand Up @@ -124,6 +178,9 @@

# s.b. CloudShell
\bCloudshell\b
\bCloud Shell\b
\bcloudshell\b
\bcloud shell\b

# s.b. CloudTrail
\bCloudtrail\b
Expand Down Expand Up @@ -309,6 +366,79 @@

# s.b. Key Vault
\bKey vault\b
\bKeyVault\b

# s.b. Ampere
\bampere\b

# s.b. Azure DevOps Server
\bAzure DevOps server\b

# s.b. Synapse Analytics
\bSynapse analytics\b
\bsynapse analytics\b

# s.b. Cognitive Services
\bCognitive services\b
\bcognitive services\b

# s.b. Event Hubs
\bEvent hubs\b
\bevent hubs\b

# s.b. CloudOps
\bCloud Ops\b
\bCloud ops\b
\bcloud ops\b

# s.b. Batch Service
\bBatch service\b
\bbatch service\b

# s.b. Service Fabric Cluster
\bservice fabric cluster\b

# s.b. Azure Kubernetes Service
\bAzure Kubernetes service\b

# s.b. Cosmos DB
\bCosmosDB\b

# s.b. SignalR Service
\bSignalR service\b
\bSignal R Service\b

# s.b. App Service Certificate
\bapp service certificate\b

# s.b. Privileged Identity Management
\bprivileged identity management\b

# s.b. BizTalk Service
\bBizTalk service\b
\bBiztalk service\b
\bBiz Talk service\b
\bBiz Talk Service\b

# s.b. Data Box
\bdata box\b

# s.b. Database Migration Service
\bdatabase migration service\b

# s.b. Internet Analyzer
\bInternet analyzer\b
\binternet analyzer\b

# s.b. Web Application Firewall
\bWeb application firewall\b
\bweb Application Firewall\b

# s.b. SQL Vulnerability Assessment
\bSQL vulnerability assessment\b

# s.b. StorSimple
\bStor Simple\b

#
# Common Typos
Expand Down Expand Up @@ -348,5 +478,9 @@
# s.b. policies
[Pp]olices

# s.b. CSV
\bCVS\b

# Reject duplicate words
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s

24 changes: 24 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,27 @@ Key Vault Vault

# luna containers in scan output
\bluna/.*\b

# this comes up in permissions and is valid
\broot root\b

# AWS resources
(ami|subnet|vpc|sg)-[0-9a-fA-F]{17}

# http and https URLs
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)

# registry key paths
HKEY_[\w\\]*

# Container digests
\bsha256:\w*

# mime types
\bapplication\/\S*

# skip mql uids
uid:\s.*$

# ARN values
\barn:\S*
2 changes: 2 additions & 0 deletions .github/actions/spelling/reject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ Sorce
^untill$
^untilling$
^wether.*
\w*(?<!right-)click
press

0 comments on commit 64285c4

Please sign in to comment.