diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6df348b72140..c582e3c0b1349 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,6 +104,13 @@ jobs: with: fetch-depth: 2 + - name: check typos + if: ${{ env.CI_JOB_NAME == 'mingw-check-tidy' }} + uses: crate-ci/typos@v1.28.2 + 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 diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000000000..cfe210ec21e61 --- /dev/null +++ b/typos.toml @@ -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\\)\\]", +] \ No newline at end of file