| 1 | # Config for the `typos` crate, used by `./x test tidy --extra-checks=spellcheck`. |
| 2 | # See also: https://github.com/crate-ci/typos/blob/v1.28.2/docs/reference.md |
| 3 | |
| 4 | [files] |
| 5 | extend-exclude = [ |
| 6 | # exclude git (sub)modules and generated content |
| 7 | "compiler/rustc_baked_icu_data", |
| 8 | "compiler/rustc_codegen_cranelift", |
| 9 | "compiler/rustc_codegen_gcc", |
| 10 | "library/backtrace", |
| 11 | "library/compiler-builtins", |
| 12 | "library/stdarch", |
| 13 | # generated lorem ipsum texts |
| 14 | "library/alloctests/benches/str.rs", |
| 15 | "library/alloctests/tests/str.rs", |
| 16 | ] |
| 17 | |
| 18 | [default.extend-words] |
| 19 | # Allowlist for words that look like typos but are not, or aren't worth fixing |
| 20 | # right now. Entries should look like `mipsel = "mipsel"`. |
| 21 | # |
| 22 | # tidy-alphabetical-start |
| 23 | anser = "anser" # an ANSI parsing package used by rust-analyzer |
| 24 | arange = "arange" # short for A-range |
| 25 | childs = "childs" |
| 26 | clonable = "clonable" |
| 27 | filetimes = "filetimes" # short for "file times", not a typo for "lifetimes" |
| 28 | leafs = "leafs" |
| 29 | makro = "makro" # deliberate misspelling to avoid `macro` keyword |
| 30 | misformed = "misformed" |
| 31 | moreso = "moreso" |
| 32 | numer = "numer" # short for numerator, not a typo for "number" |
| 33 | old-skool = "old-skool" # variant spelling of "old-school" |
| 34 | optin = "optin" # short for opt-in |
| 35 | publically = "publically" |
| 36 | rplace = "rplace" # short for R-place |
| 37 | splitted = "splitted" |
| 38 | sythetic = "sythetic" # typo in vendored LLVM sources |
| 39 | taits = "taits" # lowercase for TAITs (type alias impl trait) |
| 40 | targetting = "targetting" |
| 41 | unparseable = "unparseable" |
| 42 | unstability = "unstability" |
| 43 | unstalled = "unstalled" # short for un-stalled |
| 44 | # tidy-alphabetical-end |
| 45 | |
| 46 | # Denylist to forbid misspelled words that aren't detected by the built-in |
| 47 | # dictionary. Entries should look like `mipsel = ""` or `mipsel = "misspell"`; |
| 48 | # the non-empty form can be automatically fixed by `--bless`. |
| 49 | # |
| 50 | # tidy-alphabetical-start |
| 51 | atomicaly = "atomically" |
| 52 | definitinon = "definition" |
| 53 | dependy = "" |
| 54 | similarlty = "similarity" |
| 55 | # tidy-alphabetical-end |
| 56 | |
| 57 | [default.extend-identifiers] |
| 58 | # Allowlist for specific identifiers that should be permitted even though they |
| 59 | # appear to contain typos that would be forbidden in other identifiers. |
| 60 | # |
| 61 | # For example, you might want to allow a specific constant like |
| 62 | # `DNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME`, but still want to forbid |
| 63 | # the typo `INVAILD` in other places. |
| 64 | # |
| 65 | # tidy-alphabetical-start |
| 66 | DNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME = "DNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME" |
| 67 | ERRNO_ACCES = "ERRNO_ACCES" |
| 68 | ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = "ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS" |
| 69 | ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = "ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC" |
| 70 | ERROR_FILENAME_EXCED_RANGE = "ERROR_FILENAME_EXCED_RANGE" |
| 71 | ERROR_MCA_OCCURED = "ERROR_MCA_OCCURED" |
| 72 | ERROR_REQ_NOT_ACCEP = "ERROR_REQ_NOT_ACCEP" |
| 73 | EnzymeTypeTreeShiftIndiciesEq = "EnzymeTypeTreeShiftIndiciesEq" |
| 74 | EnzymeTypeTreeShiftIndiciesEqFn = "EnzymeTypeTreeShiftIndiciesEqFn" |
| 75 | Oppen = "Oppen" # Derek C. Oppen, author of "Pretty Printing" (1979) |
| 76 | # typos treats this as two different camelcase words (`SETTIN` and `Gs`) |
| 77 | # Tracked in: https://github.com/crate-ci/typos/issues/745 |
| 78 | SETTINGs = "SETTINGs" |
| 79 | debug_aranges = "debug_aranges" # debug A-ranges |
| 80 | key_smove = "key_smove" # shifted move key, used by terminfo |
| 81 | shift_indicies_eq = "shift_indicies_eq" |
| 82 | tolen = "tolen" # length of "to" buffer, used by `sendto` in Windows sockets |
| 83 | # tidy-alphabetical-end |
| 84 | |
| 85 | [default] |
| 86 | extend-ignore-words-re = [ |
| 87 | # words with length <= 4 chars is likely noise |
| 88 | "^[a-zA-Z]{1,4}$", |
| 89 | ] |
| 90 | |
| 91 | extend-ignore-re = [ |
| 92 | # allow turning off spell checking |
| 93 | "(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on", |
| 94 | # ignore these intentional typo examples |
| 95 | "/// 1 \\| #\\[cfg\\(widnows\\)\\]", |
| 96 | "/// warning: unexpected `cfg` condition name: `widnows`", |
| 97 | "/// #\\[cfg\\(widnows\\)\\]", |
| 98 | "\\.arg\\(\"Oh no, a tpyo!\"\\)", |
| 99 | # string used in benches |
| 100 | "\"core::iter::adapters::Copie\"", |
| 101 | "-Ccontrol-flow-guard", |
| 102 | "concat!\\(\"CURRENT_RUSTC_VERSIO\", \"N\"\\)", |
| 103 | "\\*\\*v\\*\\*ariable", |
| 104 | ] |