mirror of
https://github.com/crate-ci/typos.git
synced 2026-11-21 04:54:04 +01:00
docs(ref): Provide identifier/word config examples
This commit is contained in:
1 parent
3c14191fcc
commit
a9735e2e14
1 file changed
+18
@@ -175,6 +175,16 @@ Custom uncorrectable sections (e.g. markdown code fences, PGP signatures, etc)
|
||||
|
||||
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.
|
||||
|
||||
Example:
|
||||
```toml
|
||||
[default.extend-identifiers]
|
||||
## Names
|
||||
Hte = "Hte"
|
||||
## External
|
||||
ERROR_FILENAME_EXCED_RANGE = "ERROR_FILENAME_EXCED_RANGE"
|
||||
ERROR_FILENAME_EXCEDE_RANGE = "ERROR_FILENAME_EXCED_RANGE"
|
||||
```
|
||||
|
||||
#### `default.extend-ignore-identifiers-re`
|
||||
|
||||
- Type: list of [regexes](https://docs.rs/regex/latest/regex/index.html#syntax)
|
||||
@@ -187,6 +197,14 @@ Pattern-match always-valid identifiers.
|
||||
|
||||
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.
|
||||
|
||||
Example:
|
||||
```toml
|
||||
[default.extend-words]
|
||||
## Project-specific acronym
|
||||
taits = "taits"
|
||||
tais = "taits"
|
||||
```
|
||||
|
||||
#### `default.extend-ignore-words-re`
|
||||
|
||||
- Type: list of [regexes](https://docs.rs/regex/latest/regex/index.html#syntax)
|
||||
|
||||
Reference in new issue
Block a user