Skip to content

Commit 5b7daa7

Browse files
committed
setup typos check in ci
1 parent 2b5e680 commit 5b7daa7

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/ci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ jobs:
104104
with:
105105
fetch-depth: 2
106106

107+
- name: check typos
108+
if: ${{ env.CI_JOB_NAME == 'mingw-check-tidy' }}
109+
uses: crate-ci/[email protected]
110+
with:
111+
files: ./compiler
112+
config: ./typos.toml
113+
107114
# Free up disk space on Linux by removing preinstalled components that
108115
# we do not need. We do this to enable some of the less resource
109116
# intensive jobs to run on free runners, which however also have

typos.toml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[files]
2+
extend-exclude = [
3+
# ./compiler excludes
4+
"compiler/rustc_codegen_gcc",
5+
"compiler/rustc_codegen_cranelift",
6+
"compiler/rustc_baked_icu_data",
7+
]
8+
9+
[default.extend-words]
10+
thir = "thir"
11+
padd = "padd"
12+
rplace = "rplace"
13+
arange = "arange"
14+
rela = "rela"
15+
unstalled = "unstalled"
16+
taits = "taits"
17+
Datas = "Datas"
18+
splitted = "splitted"
19+
leafs = "leafs"
20+
Lits = "Lits"
21+
makro = "makro"
22+
optin = "optin"
23+
parm = "parm"
24+
EXCED = "EXCED"
25+
Shortern = "Shortern"
26+
unparseable = "unparseable"
27+
replacable = "replacable"
28+
matcheable = "matcheable"
29+
30+
[default]
31+
extend-ignore-words-re = [
32+
# words with length <= 3 chars is likely noise
33+
"^[a-zA-Z]{1,3}$",
34+
]
35+
36+
extend-ignore-re = [
37+
# ignore this intensional typo examples from lints
38+
"/// 1 \\| #\\[cfg\\(widnows\\)\\]",
39+
"/// warning: unexpected `cfg` condition name: `widnows`",
40+
"/// #\\[cfg\\(widnows\\)\\]",
41+
]

0 commit comments

Comments
 (0)