mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-21 00:20:55 -05:00
Merge pull request #1153 from scop/docs/config-defaults
Some checks are pending
Security audit / security_audit (push) Waiting to run
Security audit / cargo_deny (bans licenses sources) (push) Waiting to run
CI / CI (push) Blocked by required conditions
CI / Test (push) Waiting to run
CI / Check MSRV (push) Waiting to run
CI / lockfile (push) Waiting to run
CI / Docs (push) Waiting to run
CI / rustfmt (push) Waiting to run
CI / clippy (push) Waiting to run
CI / Coverage (push) Waiting to run
/ linux (aarch64) (push) Waiting to run
/ linux (x86) (push) Waiting to run
/ linux (x86_64) (push) Waiting to run
/ musllinux (aarch64) (push) Waiting to run
/ musllinux (x86_64) (push) Waiting to run
/ windows (x64) (push) Waiting to run
/ windows (x86) (push) Waiting to run
/ macos (aarch64) (push) Waiting to run
/ macos (x86_64) (push) Waiting to run
/ sdist (push) Waiting to run
/ Release (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
Some checks are pending
Security audit / security_audit (push) Waiting to run
Security audit / cargo_deny (bans licenses sources) (push) Waiting to run
CI / CI (push) Blocked by required conditions
CI / Test (push) Waiting to run
CI / Check MSRV (push) Waiting to run
CI / lockfile (push) Waiting to run
CI / Docs (push) Waiting to run
CI / rustfmt (push) Waiting to run
CI / clippy (push) Waiting to run
CI / Coverage (push) Waiting to run
/ linux (aarch64) (push) Waiting to run
/ linux (x86) (push) Waiting to run
/ linux (x86_64) (push) Waiting to run
/ musllinux (aarch64) (push) Waiting to run
/ musllinux (x86_64) (push) Waiting to run
/ windows (x64) (push) Waiting to run
/ windows (x86) (push) Waiting to run
/ macos (aarch64) (push) Waiting to run
/ macos (x86_64) (push) Waiting to run
/ sdist (push) Waiting to run
/ Release (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
docs(ref): Document config defaults
This commit is contained in:
commit
f468223faf
1 changed files with 23 additions and 23 deletions
|
@ -15,29 +15,29 @@ Configuration is read from the following (in precedence order)
|
|||
|
||||
### Config Fields
|
||||
|
||||
| Field | Argument | Format | Description |
|
||||
|------------------------|-------------------|--------|-------------|
|
||||
| files.binary | --binary | bool | Check binary files as text |
|
||||
| files.extend-exclude | --exclude | list of strings | Typos-specific ignore globs (gitignore syntax) |
|
||||
| \- | --force-exclude | bool | Respect excluded files even for paths passed explicitly. |
|
||||
| files.ignore-hidden | --hidden | bool | Skip hidden files and directories. |
|
||||
| files.ignore-files | --ignore | bool | Respect ignore files. |
|
||||
| files.ignore-dot | --ignore-dot | bool | Respect .ignore files. |
|
||||
| files.ignore-vcs | --ignore-vcs | bool | Respect ignore files in vcs directories. |
|
||||
| files.ignore-global | --ignore-global | bool | Respect global ignore files. |
|
||||
| files.ignore-parent | --ignore-parent | bool | Respect ignore files in parent directories. |
|
||||
| default.binary | --binary | bool | Check binary files as text |
|
||||
| default.check-filename | \- | bool | Verifying spelling in file names. |
|
||||
| default.check-file | \- | bool | Verifying spelling in files. |
|
||||
| default.unicode | --unicode | bool | Allow unicode characters in identifiers (and not just ASCII) |
|
||||
| default.locale | --locale | en, en-us, en-gb, en-ca, en-au | English dialect to correct to. |
|
||||
| default.extend-ignore-re | \- | list of [regexes](https://docs.rs/regex/latest/regex/index.html#syntax) | Custom uncorrectable sections (e.g. markdown code fences, PGP signatures, etc) |
|
||||
| default.extend-identifiers | \- | table of strings | Corrections for [identifiers](./design.md#identifiers-and-words). When the correction is blank, the identifier is never valid. When the correction is the key, the identifier is always valid. |
|
||||
| default.extend-ignore-identifiers-re | \- | list of [regexes](https://docs.rs/regex/latest/regex/index.html#syntax) | Pattern-match always-valid identifiers |
|
||||
| default.extend-words | \- | table of strings | Corrections for [words](./design.md#identifiers-and-words). When the correction is blank, the word is never valid. When the correction is the key, the word is always valid. |
|
||||
| default.extend-ignore-words-re | \- | list of [regexes](https://docs.rs/regex/latest/regex/index.html#syntax) | Pattern-match always-valid words. Note: you must handle case insensitivity yourself |
|
||||
| type.\<name>.\<field> | \<varied> | \<varied> | See `default.` for child keys. Run with `--type-list` to see available `<name>`s |
|
||||
| type.\<name>.extend-glob | \- | list of strings | File globs for matching `<name>` |
|
||||
| Field | Argument | Format | Default | Description |
|
||||
|------------------------|-------------------|--------|---------|-------------|
|
||||
| files.binary | --binary | bool | false | Check binary files as text. |
|
||||
| files.extend-exclude | --exclude | list of strings | \- | Typos-specific ignore globs (gitignore syntax). |
|
||||
| \- | --force-exclude | bool | false | Respect excluded files even for paths passed explicitly. |
|
||||
| files.ignore-hidden | --hidden | bool | true | Skip hidden files and directories. |
|
||||
| files.ignore-files | --ignore | bool | true | Respect ignore files. |
|
||||
| files.ignore-dot | --ignore-dot | bool | true | Respect .ignore files. |
|
||||
| files.ignore-vcs | --ignore-vcs | bool | true | Respect ignore files in vcs directories. |
|
||||
| files.ignore-global | --ignore-global | bool | true | Respect global ignore files. |
|
||||
| files.ignore-parent | --ignore-parent | bool | true | Respect ignore files in parent directories. |
|
||||
| default.binary | --binary | bool | false | Check binary files as text. |
|
||||
| default.check-filename | \- | bool | true | Verify spelling in file names. |
|
||||
| default.check-file | \- | bool | true | Verify spelling in files. |
|
||||
| default.unicode | --unicode | bool | true | Allow unicode characters in identifiers (and not just ASCII). |
|
||||
| default.locale | --locale | en, en-us, en-gb, en-ca, en-au | en | English dialect to correct to. |
|
||||
| default.extend-ignore-re | \- | list of [regexes](https://docs.rs/regex/latest/regex/index.html#syntax) | \- | Custom uncorrectable sections (e.g. markdown code fences, PGP signatures, etc) |
|
||||
| default.extend-identifiers | \- | table of strings | \- | Corrections for [identifiers](./design.md#identifiers-and-words). When the correction is blank, the identifier is never valid. When the correction is the key, the identifier is always valid. |
|
||||
| default.extend-ignore-identifiers-re | \- | list of [regexes](https://docs.rs/regex/latest/regex/index.html#syntax) | \- | Pattern-match always-valid identifiers. |
|
||||
| default.extend-words | \- | table of strings | \- | Corrections for [words](./design.md#identifiers-and-words). When the correction is blank, the word is never valid. When the correction is the key, the word is always valid. |
|
||||
| default.extend-ignore-words-re | \- | list of [regexes](https://docs.rs/regex/latest/regex/index.html#syntax) | \- | Pattern-match always-valid words. Note: you must handle case insensitivity yourself. |
|
||||
| type.\<name>.\<field> | \<varied> | \<varied> | \<varied> | See `default.` for child keys. Run with `--type-list` to see available `<name>`s. |
|
||||
| type.\<name>.extend-glob | \- | list of strings | \- | File globs for matching `<name>`. |
|
||||
|
||||
Common `extend-ignore-re`:
|
||||
- Line ignore with trailing `# spellchecker:disable-line`: `"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"`
|
||||
|
|
Loading…
Reference in a new issue