Skip to content

Commit

Permalink
Update spellcheck with new patterns (#242)
Browse files Browse the repository at this point in the history
Catch new spelling issues.

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 authored Jul 3, 2023
1 parent 7147f65 commit 21a0188
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
21 changes: 10 additions & 11 deletions .github/actions/spelling/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# 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 |
| -------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [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.
2 changes: 1 addition & 1 deletion .github/actions/spelling/advice.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If items relate to a ...

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 (on whichever branch you're using).

- well-formed pattern.

Expand Down
8 changes: 8 additions & 0 deletions .github/actions/spelling/line_forbidden.patterns
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Detect common combinations of valid words that are in fact invalid.
# Useful for brand capitalizations

#
# Our Terms
#

# s.b. Mondoo Platform
\sthe Mondoo Platform\b
\sMondoo platform\b

#
# Industry Terms
#
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ console\.mondoo\.com\/space.*\b
# azure subscription ID
[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}

# azure subscriptions URL
\/subscriptions\/\S*

# docker container
\b[a-z,0-9]{12}\b

# URLs in markdown links / images
]\(.*\)

Expand Down Expand Up @@ -53,5 +59,13 @@ uid:\s.*$
# ARN values
\barn:\S*

# mac user dir path
\/Users\/\S*

# AWS Token, ID access key, etc
aws_session_token\s+\=(\s+)?.+
aws_access_key_id\s+\=(\s+)?.+
aws_secret_access_key\s+\=(\s+)?.+

# Azure postgreSql resource
postgreSql

0 comments on commit 21a0188

Please sign in to comment.