Skip to content

Commit

Permalink
setup typos check in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
klensy committed Dec 7, 2024
1 parent d89d749 commit f01ec3c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ jobs:
with:
fetch-depth: 2

- name: check typos
if: ${{ env.CI_JOB_NAME == 'mingw-check-tidy' }}
uses: crate-ci/[email protected]
with:
files: ./compiler
config: ./typos.toml

# Free up disk space on Linux by removing preinstalled components that
# we do not need. We do this to enable some of the less resource
# intensive jobs to run on free runners, which however also have
Expand Down
41 changes: 41 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[files]
extend-exclude = [
# ./compiler excludes
"compiler/rustc_codegen_gcc",
"compiler/rustc_codegen_cranelift",
"compiler/rustc_baked_icu_data",
]

[default.extend-words]
thir = "thir"
padd = "padd"
rplace = "rplace"
arange = "arange"
rela = "rela"
unstalled = "unstalled"
taits = "taits"
Datas = "Datas"
splitted = "splitted"
leafs = "leafs"
Lits = "Lits"
makro = "makro"
optin = "optin"
parm = "parm"
EXCED = "EXCED"
Shortern = "Shortern"
unparseable = "unparseable"
replacable = "replacable"
matcheable = "matcheable"

[default]
extend-ignore-words-re = [
# words with length <= 3 chars is likely noise
"^[a-zA-Z]{1,3}$",
]

extend-ignore-re = [
# ignore this intensional typo examples from lints
"/// 1 \\| #\\[cfg\\(widnows\\)\\]",
"/// warning: unexpected `cfg` condition name: `widnows`",
"/// #\\[cfg\\(widnows\\)\\]",
]

0 comments on commit f01ec3c

Please sign in to comment.