Skip to content

Commit 75f6ce1

Browse files
committedMay 10, 2023
Setup spell checker
1 parent 41e9e72 commit 75f6ce1

File tree

5 files changed

+318
-2
lines changed

5 files changed

+318
-2
lines changed
 

‎.cspell.json

+304
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,304 @@
1+
// See: https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell
2+
{
3+
"version": "0.2",
4+
// language - current active spelling language
5+
"language": "en",
6+
// dictionaries - list of the names of the dictionaries to use
7+
"dictionaries": [
8+
"en_US",
9+
"softwareTerms",
10+
"c",
11+
"cpp",
12+
"python",
13+
"python-custom",
14+
"rust",
15+
"unix",
16+
"posix",
17+
"winapi"
18+
],
19+
// dictionaryDefinitions - this list defines any custom dictionaries to use
20+
"dictionaryDefinitions": [],
21+
"ignorePaths": [
22+
"**/__pycache__/**",
23+
"Lib/**"
24+
],
25+
// words - list of words to be always considered correct
26+
"words": [
27+
// Rust
28+
"ahash",
29+
"bidi",
30+
"biguint",
31+
"bindgen",
32+
"bitflags",
33+
"bstr",
34+
"byteorder",
35+
"chrono",
36+
"consts",
37+
"cstring",
38+
"flate2",
39+
"fract",
40+
"hasher",
41+
"hexf",
42+
"idents",
43+
"indexmap",
44+
"insta",
45+
"keccak",
46+
"lalrpop",
47+
"libc",
48+
"libz",
49+
"longlong",
50+
"Manually",
51+
"nbaz",
52+
"maplit",
53+
"memchr",
54+
"memrchr",
55+
"memmap",
56+
"metas",
57+
"modpow",
58+
"nanos",
59+
"peekable",
60+
"powc",
61+
"powf",
62+
"prepended",
63+
"punct",
64+
"replacen",
65+
"rsplitn",
66+
"rustc",
67+
"rustfmt",
68+
"seekfrom",
69+
"splitn",
70+
"subsec",
71+
"timsort",
72+
"trai",
73+
"ulonglong",
74+
"unic",
75+
"unistd",
76+
"unsync",
77+
"winapi",
78+
"winsock",
79+
// Python
80+
"abstractmethods",
81+
"aiter",
82+
"anext",
83+
"arrayiterator",
84+
"arraytype",
85+
"asend",
86+
"athrow",
87+
"basicsize",
88+
"cformat",
89+
"classcell",
90+
"closesocket",
91+
"codepoint",
92+
"codepoints",
93+
"cpython",
94+
"decompressor",
95+
"defaultaction",
96+
"descr",
97+
"dictcomp",
98+
"dictitems",
99+
"dictkeys",
100+
"dictview",
101+
"docstring",
102+
"docstrings",
103+
"dunder",
104+
"eventmask",
105+
"fdel",
106+
"fget",
107+
"fileencoding",
108+
"fillchar",
109+
"finallyhandler",
110+
"frombytes",
111+
"fromhex",
112+
"fromunicode",
113+
"fset",
114+
"fspath",
115+
"fstring",
116+
"fstrings",
117+
"genexpr",
118+
"getattro",
119+
"getformat",
120+
"getnewargs",
121+
"getweakrefcount",
122+
"getweakrefs",
123+
"hostnames",
124+
"idiv",
125+
"impls",
126+
"infj",
127+
"instancecheck",
128+
"instanceof",
129+
"isabstractmethod",
130+
"itemiterator",
131+
"itemsize",
132+
"iternext",
133+
"keyiterator",
134+
"kwarg",
135+
"kwargs",
136+
"linearization",
137+
"linearize",
138+
"listcomp",
139+
"mappingproxy",
140+
"maxsplit",
141+
"memoryview",
142+
"memoryviewiterator",
143+
"metaclass",
144+
"metaclasses",
145+
"metatype",
146+
"mro",
147+
"mros",
148+
"nanj",
149+
"ndigits",
150+
"ndim",
151+
"nonbytes",
152+
"origname",
153+
"posixsubprocess",
154+
"pyexpat",
155+
"PYTHONDEBUG",
156+
"PYTHONHOME",
157+
"PYTHONINSPECT",
158+
"PYTHONOPTIMIZE",
159+
"PYTHONPATH",
160+
"PYTHONPATH",
161+
"PYTHONVERBOSE",
162+
"PYTHONWARNINGS",
163+
"qualname",
164+
"radd",
165+
"rdiv",
166+
"rdivmod",
167+
"reconstructor",
168+
"reversevalueiterator",
169+
"rfloordiv",
170+
"rlshift",
171+
"rmod",
172+
"rpow",
173+
"rrshift",
174+
"rsub",
175+
"rtruediv",
176+
"scproxy",
177+
"setattro",
178+
"setcomp",
179+
"stacklevel",
180+
"subclasscheck",
181+
"subclasshook",
182+
"unionable",
183+
"unraisablehook",
184+
"valueiterator",
185+
"vararg",
186+
"varargs",
187+
"varnames",
188+
"warningregistry",
189+
"warnopts",
190+
"weakproxy",
191+
"xopts",
192+
// RustPython
193+
"baseclass",
194+
"Bytecode",
195+
"cfgs",
196+
"codegen",
197+
"dedentations",
198+
"dedents",
199+
"deduped",
200+
"downcasted",
201+
"dumpable",
202+
"GetSet",
203+
"internable",
204+
"makeunicodedata",
205+
"miri",
206+
"nonterminal",
207+
"notrace",
208+
"pyarg",
209+
"pyarg",
210+
"pyargs",
211+
"PyAttr",
212+
"pyc",
213+
"PyClass",
214+
"PyClassMethod",
215+
"PyException",
216+
"PyFunction",
217+
"pygetset",
218+
"pyimpl",
219+
"pymember",
220+
"PyMethod",
221+
"PyModule",
222+
"pyname",
223+
"pyobj",
224+
"PyObject",
225+
"pypayload",
226+
"PyProperty",
227+
"pyref",
228+
"PyResult",
229+
"pyslot",
230+
"PyStaticMethod",
231+
"pystr",
232+
"pystruct",
233+
"pystructseq",
234+
"pytrace",
235+
"reducelib",
236+
"richcompare",
237+
"RustPython",
238+
"struc",
239+
"tracebacks",
240+
"typealiases",
241+
"Unconstructible",
242+
"unhashable",
243+
"uninit",
244+
"unraisable",
245+
"wasi",
246+
"zelf",
247+
// cpython
248+
"argtypes",
249+
"asdl",
250+
"asname",
251+
"augassign",
252+
"badsyntax",
253+
"basetype",
254+
"boolop",
255+
"bxor",
256+
"cellarg",
257+
"cellvar",
258+
"cellvars",
259+
"cmpop",
260+
"dictoffset",
261+
"elts",
262+
"excepthandler",
263+
"finalbody",
264+
"freevar",
265+
"freevars",
266+
"fromlist",
267+
"heaptype",
268+
"IMMUTABLETYPE",
269+
"kwonlyarg",
270+
"kwonlyargs",
271+
"linearise",
272+
"maxdepth",
273+
"mult",
274+
"nkwargs",
275+
"orelse",
276+
"patma",
277+
"posonlyarg",
278+
"posonlyargs",
279+
"prec",
280+
"significand",
281+
"stackdepth",
282+
"unaryop",
283+
"unparse",
284+
"unparser",
285+
"VARKEYWORDS",
286+
"varkwarg",
287+
"wbits",
288+
"withitem",
289+
"withitems",
290+
"withs"
291+
],
292+
// flagWords - list of words to be always considered incorrect
293+
"flagWords": [
294+
],
295+
"ignoreRegExpList": [
296+
],
297+
// languageSettings - allow for per programming language configuration settings.
298+
"languageSettings": [
299+
{
300+
"languageId": "python",
301+
"locale": "en"
302+
}
303+
]
304+
}

‎.github/workflows/ci.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ jobs:
6262
run: python -m pip install ruff
6363
- name: run python lint
6464
run: ruff --ignore=E501 ast --show-source
65+
66+
- name: spell checker
67+
uses: streetsidesoftware/cspell-action@v2
68+
with:
69+
files: |
70+
'ast/**/*.rs'
71+
'core/**/*.rs'
72+
'literal/**/*.rs'
73+
'parser/**/*.rs'

‎ast/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub mod fold {
3232
#[cfg(feature = "visitor")]
3333
mod visitor {
3434
use super::generic::*;
35+
3536
include!("gen/visitor.rs");
3637
}
3738

‎literal/src/escape.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub(crate) const fn choose_quote(
6565
Quote::Double => (double_count, single_count),
6666
};
6767

68-
// always use primary unless we have primary but no seconday
68+
// always use primary unless we have primary but no secondary
6969
let use_secondary = primary_count > 0 && secondary_count == 0;
7070
if use_secondary {
7171
(preferred_quote.swap(), secondary_count)
@@ -242,7 +242,7 @@ impl<'a> Escape for UnicodeEscape<'a> {
242242
}
243243

244244
#[cfg(test)]
245-
mod unicode_escapse_tests {
245+
mod unicode_escape_tests {
246246
use super::*;
247247

248248
#[test]

‎scripts/cspell.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
cspell "ast/**/*.rs" "literal/**/*.rs" "core/**/*.rs" "parser/**/*.rs"

0 commit comments

Comments
 (0)
Please sign in to comment.