Skip to content

Commit 951b55b

Browse files
committed
Add check-spelling
1 parent 949c36d commit 951b55b

File tree

10 files changed

+1049
-0
lines changed

10 files changed

+1049
-0
lines changed

.github/actions/spelling/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# check-spelling/check-spelling configuration
2+
3+
File | Purpose | Format | Info
4+
-|-|-|-
5+
[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)
6+
[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)
7+
[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)
8+
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
9+
[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)
10+
[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)
11+
[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)
12+
[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)
13+
[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)
14+
15+
Note: you can replace any of these files with a directory by the same name (minus the suffix)
16+
and then include multiple files inside that directory (with that suffix) to merge multiple files together.

.github/actions/spelling/advice.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
2+
<details><summary>If the flagged items are :exploding_head: false positives</summary>
3+
4+
If items relate to a ...
5+
* binary file (or some other file you wouldn't want to check at all).
6+
7+
Please add a file path to the `excludes.txt` file matching the containing file.
8+
9+
File paths are Perl 5 Regular Expressions - you can [test](
10+
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
11+
12+
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
13+
../tree/HEAD/README.md) (on whichever branch you're using).
14+
15+
* well-formed pattern.
16+
17+
If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
18+
try adding it to the `patterns.txt` file.
19+
20+
Patterns are Perl 5 Regular Expressions - you can [test](
21+
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
22+
23+
Note that patterns can't match multiline strings.
24+
25+
</details>

.github/actions/spelling/allow.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github
2+
https
3+
ssh
4+
ubuntu

0 commit comments

Comments
 (0)