Skip to content

Commit c895cb0

Browse files
authoredAug 26, 2022
feat(ci): add check-spelling (#1189)
1 parent f9951bf commit c895cb0

10 files changed

+735
-0
lines changed
 

‎.github/actions/spelling/README.md

+16
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

+25
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 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

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github
2+
https
3+
ssh
4+
ubuntu
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Apple music
2+
\bembed\.music\.apple\.com/fr/playlist/usr-share/[-\w.]+
3+
# Spotify
4+
\bopen\.spotify\.com/embed/playlist/\w+

‎.github/actions/spelling/excludes.txt

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
2+
(?:^|/)(?i)COPYRIGHT
3+
(?:^|/)(?i)LICEN[CS]E
4+
(?:^|/)go\.sum$
5+
(?:^|/)package(?:-lock|)\.json$
6+
(?:^|/)vendor/
7+
ignore$
8+
\.a$
9+
\.ai$
10+
\.avi$
11+
\.bmp$
12+
\.bz2$
13+
\.crt$
14+
\.dll$
15+
\.DS_Store$
16+
\.eot$
17+
\.exe$
18+
\.gif$
19+
\.gitattributes$
20+
\.graffle$
21+
\.gz$
22+
\.icns$
23+
\.ico$
24+
\.jar$
25+
\.jpe?g$
26+
\.key$
27+
\.lib$
28+
\.lock$
29+
\.map$
30+
\.min\..
31+
\.mod$
32+
\.mp[34]$
33+
\.o$
34+
\.ocf$
35+
\.otf$
36+
\.pdf$
37+
\.pem$
38+
\.png$
39+
\.psd$
40+
\.s$
41+
\.svg$
42+
\.tiff?$
43+
\.ttf$
44+
\.wav$
45+
\.woff2?$
46+
\.zip$
47+
^\.github/actions/spelling/
48+
^\Q.github/readme/partials/documentation/inspirations.md\E$
49+
^\Q.github/workflows/spelling.yml\E$
50+
^\Qsource/plugins/sponsors/index.mjs\E$
51+
^\Qsource/plugins/stargazers/worldmap/atlas/50m_countries.geojson\E$
52+
^\Qsource/templates/terminal/fonts.css\E$
53+
^\Qsource/templates/terminal/partials/screenshot.ejs\E$
54+
^\Qtests/mocks/api/github/rest/emojis/get.mjs\E$

0 commit comments

Comments
 (0)
Failed to load comments.