| # Config for the `typos` crate, used by `./x test tidy --extra-checks=spellcheck`. | |
| # See also: https://github.com/crate-ci/typos/blob/v1.28.2/docs/reference.md | |
| [files] | |
| extend-exclude = [ | |
| # exclude git (sub)modules and generated content | |
| "compiler/rustc_baked_icu_data", | |
| "compiler/rustc_codegen_cranelift", | |
| "compiler/rustc_codegen_gcc", | |
| "library/backtrace", | |
| "library/compiler-builtins", | |
| "library/stdarch", | |
| # generated lorem ipsum texts | |
| "library/alloctests/benches/str.rs", | |
| "library/alloctests/tests/str.rs", | |
| "library/coretests/benches/pattern.rs", | |
| ] | |
| [default.extend-words] | |
| # Allowlist for words that look like typos but are not, or aren't worth fixing | |
| # right now. Entries should look like `mipsel = "mipsel"`. | |
| # | |
| # tidy-alphabetical-start | |
| EXPORTAS = "EXPORTAS" # MSVC linker keyword used with /EXPORT directives | |
| anser = "anser" # an ANSI parsing package used by rust-analyzer | |
| arange = "arange" # short for A-range | |
| childs = "childs" | |
| clonable = "clonable" | |
| filetimes = "filetimes" # short for "file times", not a typo for "lifetimes" | |
| leafs = "leafs" | |
| makro = "makro" # deliberate misspelling to avoid `macro` keyword | |
| misformed = "misformed" | |
| moreso = "moreso" | |
| numer = "numer" # short for numerator, not a typo for "number" | |
| old-skool = "old-skool" # variant spelling of "old-school" | |
| optin = "optin" # short for opt-in | |
| publically = "publically" | |
| rplace = "rplace" # short for R-place | |
| splitted = "splitted" | |
| sythetic = "sythetic" # typo in vendored LLVM sources | |
| taits = "taits" # lowercase for TAITs (type alias impl trait) | |
| targetting = "targetting" | |
| unparseable = "unparseable" | |
| unstability = "unstability" | |
| unstalled = "unstalled" # short for un-stalled | |
| # tidy-alphabetical-end | |
| # Denylist to forbid misspelled words that aren't detected by the built-in | |
| # dictionary. Entries should look like `mipsel = ""` or `mipsel = "misspell"`; | |
| # the non-empty form can be automatically fixed by `--bless`. | |
| # | |
| # tidy-alphabetical-start | |
| atomicaly = "atomically" | |
| definitinon = "definition" | |
| dependy = "" | |
| similarlty = "similarity" | |
| # tidy-alphabetical-end | |
| [default.extend-identifiers] | |
| # Allowlist for specific identifiers that should be permitted even though they | |
| # appear to contain typos that would be forbidden in other identifiers. | |
| # | |
| # For example, you might want to allow a specific constant like | |
| # `DNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME`, but still want to forbid | |
| # the typo `INVAILD` in other places. | |
| # | |
| # tidy-alphabetical-start | |
| DNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME = "DNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME" | |
| ERRNO_ACCES = "ERRNO_ACCES" | |
| ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = "ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS" | |
| ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = "ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC" | |
| ERROR_FILENAME_EXCED_RANGE = "ERROR_FILENAME_EXCED_RANGE" | |
| ERROR_MCA_OCCURED = "ERROR_MCA_OCCURED" | |
| ERROR_REQ_NOT_ACCEP = "ERROR_REQ_NOT_ACCEP" | |
| EnzymeTypeTreeShiftIndiciesEq = "EnzymeTypeTreeShiftIndiciesEq" | |
| EnzymeTypeTreeShiftIndiciesEqFn = "EnzymeTypeTreeShiftIndiciesEqFn" | |
| Oppen = "Oppen" # Derek C. Oppen, author of "Pretty Printing" (1979) | |
| PUNICODE_STRING = "PUNICODE_STRING" | |
| # typos treats this as two different camelcase words (`SETTIN` and `Gs`) | |
| # Tracked in: https://github.com/crate-ci/typos/issues/745 | |
| SETTINGs = "SETTINGs" | |
| debug_aranges = "debug_aranges" # debug A-ranges | |
| key_smove = "key_smove" # shifted move key, used by terminfo | |
| shift_indicies_eq = "shift_indicies_eq" | |
| tolen = "tolen" # length of "to" buffer, used by `sendto` in Windows sockets | |
| # tidy-alphabetical-end | |
| [default] | |
| extend-ignore-words-re = [ | |
| # words with length <= 4 chars is likely noise | |
| "^[a-zA-Z]{1,4}$", | |
| ] | |
| extend-ignore-re = [ | |
| # allow turning off spell checking | |
| "(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on", | |
| # ignore these intentional typo examples | |
| "/// 1 \\| #\\[cfg\\(widnows\\)\\]", | |
| "/// warning: unexpected `cfg` condition name: `widnows`", | |
| "/// #\\[cfg\\(widnows\\)\\]", | |
| "\\.arg\\(\"Oh no, a tpyo!\"\\)", | |
| # string used in benches | |
| "\"core::iter::adapters::Copie\"", | |
| "-Ccontrol-flow-guard", | |
| "concat!\\(\"CURRENT_RUSTC_VERSIO\", \"N\"\\)", | |
| "\\*\\*v\\*\\*ariable", | |
| ] |