Skip to content

Commit 52bdba5

Browse files
committed
Add check-spelling
1 parent 6e73538 commit 52bdba5

9 files changed

Lines changed: 454 additions & 0 deletions

File tree

.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 do not appear to be text</summary>
3+
4+
If items relate to a ...
5+
* well-formed pattern.
6+
7+
If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
8+
try adding it to the `patterns.txt` file.
9+
10+
Patterns are Perl 5 Regular Expressions - you can [test](
11+
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
12+
13+
Note that patterns can't match multiline strings.
14+
15+
* binary file.
16+
17+
Please add a file path to the `excludes.txt` file matching the containing file.
18+
19+
File paths are Perl 5 Regular Expressions - you can [test](
20+
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
21+
22+
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
23+
../tree/HEAD/README.md) (on whichever branch you're using).
24+
25+
</details>

.github/actions/spelling/allow.txt

Whitespace-only changes.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
\.ai$
9+
\.avi$
10+
\.bmp$
11+
\.bz2$
12+
\.crt$
13+
\.DS_Store$
14+
\.eot$
15+
\.gif$
16+
\.gitattributes$
17+
\.graffle$
18+
\.gz$
19+
\.icns$
20+
\.ico$
21+
\.jar$
22+
\.jpe?g$
23+
\.key$
24+
\.lock$
25+
\.map$
26+
\.min\..
27+
\.mod$
28+
\.mp[34]$
29+
\.ocf$
30+
\.otf$
31+
\.pdf$
32+
\.pem$
33+
\.png$
34+
\.psd$
35+
\.svg$
36+
\.ttf$
37+
\.wav$
38+
\.woff2?$
39+
\.zip$
40+
^\.github/
41+
^\Qcomposer.json\E$
42+
^\Qpublic/css/effects.css\E$
43+
^public/.*jquery
44+
^public/.*bootstrap
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
abcdefghijklmnopqrstuvwxyz
2+
addon
3+
adf
4+
admins
5+
alnum
6+
ANONIP
7+
api
8+
args
9+
Argv
10+
asc
11+
attr
12+
autocomplete
13+
autoload
14+
backend
15+
bak
16+
bedd
17+
brightgreen
18+
btn
19+
Bugsnag
20+
captcha
21+
Chaoyi
22+
charset
23+
chcon
24+
chmod
25+
chown
26+
cleverdevil
27+
colorpulse
28+
config
29+
copyleft
30+
crt
31+
csrf
32+
css
33+
ctx
34+
ctype
35+
cydrobolt
36+
datatables
37+
datepicker
38+
datetime
39+
datetimepicker
40+
Debian
41+
digitalocean
42+
DOCTYPE
43+
Dotenv
44+
dropdown
45+
EEFF
46+
emails
47+
endforeach
48+
endif
49+
endsection
50+
enmod
51+
esnext
52+
EWB
53+
facebook
54+
fastcgi
55+
fauskanger
56+
favicon
57+
fclose
58+
FILESYSTEM
59+
fopen
60+
foreach
61+
freenode
62+
fwrite
63+
GEIU
64+
geoip
65+
geolite
66+
geolocation
67+
getcomposer
68+
github
69+
githubusercontent
70+
Globals
71+
glyphicon
72+
gmail
73+
google
74+
googleapis
75+
gpl
76+
GPLv
77+
GTu
78+
hashchange
79+
Hfi
80+
hljs
81+
homepage
82+
hostable
83+
href
84+
htm
85+
html
86+
http
87+
httpd
88+
ico
89+
IIS
90+
img
91+
imgur
92+
inbox
93+
Inno
94+
instanceof
95+
intval
96+
ipapi
97+
irc
98+
isset
99+
jpg
100+
jquery
101+
json
102+
jumbotron
103+
jvectormap
104+
keyup
105+
labelledby
106+
Laravel
107+
lastspark
108+
lemp
109+
lighttpd
110+
linux
111+
localhost
112+
lodash
113+
lon
114+
lte
115+
Lwx
116+
Lxy
117+
mailtrap
118+
maxcdn
119+
maxmind
120+
Mbstring
121+
metadata
122+
middleware
123+
mmdb
124+
modals
125+
mouseleave
126+
moz
127+
mypolr
128+
mysql
129+
namespace
130+
navbar
131+
nbc
132+
nginx
133+
noindex
134+
noreply
135+
nums
136+
opensource
137+
osd
138+
osuosl
139+
params
140+
pdo
141+
php
142+
phpunit
143+
plogin
144+
plost
145+
png
146+
polr
147+
polrci
148+
polrdatabasename
149+
polrgithub
150+
polrproject
151+
Pragma
152+
preg
153+
psetup
154+
pseudor
155+
pshorten
156+
psignup
157+
PUf
158+
qmark
159+
qrcode
160+
Queueable
161+
Quickstart
162+
RACKSPACE
163+
RBqd
164+
README
165+
readthedocs
166+
realpath
167+
recaptcha
168+
recov
169+
reddit
170+
referer
171+
refman
172+
regex
173+
RELDATE
174+
RELDAY
175+
RELMONTH
176+
RELYEAR
177+
rgba
178+
safariextension
179+
screenshots
180+
semver
181+
setcookie
182+
signup
183+
sitekey
184+
smtp
185+
sprintf
186+
sql
187+
SQLSTATE
188+
src
189+
ssl
190+
stackoverflow
191+
strftime
192+
strlen
193+
strpos
194+
strstr
195+
strtotime
196+
stylesheet
197+
sudo
198+
svg
199+
Symfony
200+
sys
201+
tabindex
202+
tablist
203+
tabpanel
204+
tbody
205+
tcase
206+
testsuite
207+
textstatus
208+
Tfh
209+
thead
210+
themable
211+
thenounproject
212+
timezone
213+
tipstimer
214+
tld
215+
toastr
216+
Tokenizer
217+
tooltip
218+
torann
219+
transclude
220+
ubuntu
221+
uncomment
222+
uri
223+
url
224+
urldecode
225+
username
226+
usr
227+
UTF
228+
validator
229+
Versioning
230+
vhosts
231+
Vvn
232+
webchat
233+
webkit
234+
website
235+
wget
236+
whitelist
237+
wiki
238+
www
239+
XHR
240+
xml
241+
Yajra
242+
yoursite
243+
youtube
244+
Zha
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere
2+
# \bm_data\b
3+
4+
# s.b. GitHub
5+
\bGithub\b
6+
7+
# s.b. GitLab
8+
\bGitlab\b
9+
10+
# s.b. JavaScript
11+
\bJavascript\b
12+
13+
# s.b. Microsoft
14+
\bMicroSoft\b
15+
16+
# s.b. another
17+
\ban other\b
18+
19+
# s.b. otherwise
20+
\bother wise\b
21+
22+
# s.b. nonexistent
23+
\bnon existing\b
24+
25+
# s.b. preemptively
26+
[Pp]re-emptively
27+
28+
# s.b. preexisting
29+
[Pp]re-existing
30+
31+
# Reject duplicate words
32+
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
2+
3+
# bootstrapcdn.com
4+
\bbootstrapcdn\.com/[-./\w]+
5+
6+
# acceptable duplicates
7+
\s(long|LONG) \g{-1}\s
8+
\@param\s+(\w+)\s+\g{-1}\s
9+
10+
# ignore long runs of a single character:
11+
\b([A-Za-z])\g{-1}{3,}\b
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
^attache$
2+
benefitting
3+
occurences?
4+
^oer$
5+
Sorce
6+
^[Ss]pae.*
7+
^untill$
8+
^untilling$
9+
^wether.*

0 commit comments

Comments
 (0)