|
| 1 | +# Configuration for typos (https://github.com/crate-ci/typos), run via the prek |
| 2 | +# hook in .pre-commit-config.yaml. |
| 3 | + |
| 4 | +[files] |
| 5 | +# Bare `typos` skips hidden dirs by default, but prek passes explicit paths and |
| 6 | +# so does check them. Turn it off so both agree. |
| 7 | +ignore-hidden = false |
| 8 | + |
| 9 | +extend-exclude = [ |
| 10 | + # Ignore `.git`, which the above `ignore-hidden = false` would otherwise pull in. |
| 11 | + ".git/", |
| 12 | + # Generated by `cargo xtask crd preview`. Most of the content is Kubernetes' |
| 13 | + # own schema documentation, which is not ours to correct, and the doc |
| 14 | + # comments we do own are already checked at their source. |
| 15 | + "crates/stackable-operator/crds/", |
| 16 | + # Generated by `cargo insta`. The inputs they are rendered from are checked |
| 17 | + # at their source in the sibling `inputs/` directories. |
| 18 | + "crates/*/tests/snapshots/", |
| 19 | +] |
| 20 | + |
| 21 | +[default] |
| 22 | +# typos has no native suppression directive |
| 23 | +# (https://github.com/crate-ci/typos/issues/316), so these regexes provide one. |
| 24 | +# A marker must sit in a comment: after `#`, `//` or `;` (free text may follow), |
| 25 | +# or inside a closed `<!-- -->`, `/* */` or `{# #}` (free text may precede the |
| 26 | +# closer). An unterminated `typos:ignore-block-start` suppresses nothing. |
| 27 | +# |
| 28 | +# Use one of the following when the word is correct at one place but would still be a typo elsewhere: |
| 29 | +# |
| 30 | +# # typos:ignore-line at the end of the line it applies to |
| 31 | +# # typos:ignore-next-line on its own line, above the offending line |
| 32 | +# # typos:ignore-block-start / typos:ignore-block-end around a block |
| 33 | +extend-ignore-re = [ |
| 34 | + '(?Rm)^.*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-line\b.*|(?:<!--[ \t]*typos:ignore-line\b.*?-->|/\*[ \t]*typos:ignore-line\b.*?\*/|\{#[ \t]*typos:ignore-line\b.*?#\})[ \t]*)$', |
| 35 | + '(?Rm)^[ \t]*(?:(?:#|//|;)[ \t]*typos:ignore-next-line\b.*|(?:<!--[ \t]*typos:ignore-next-line\b.*?-->|/\*[ \t]*typos:ignore-next-line\b.*?\*/|\{#[ \t]*typos:ignore-next-line\b.*?#\})[ \t]*)\r?\n.*$', |
| 36 | + '(?ms)(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-block-start\b|<!--[ \t]*typos:ignore-block-start\b[^\n]*?-->|/\*[ \t]*typos:ignore-block-start\b[^\n]*?\*/|\{#[ \t]*typos:ignore-block-start\b[^\n]*?#\}).*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-block-end\b|<!--[ \t]*typos:ignore-block-end\b[^\n]*?-->|/\*[ \t]*typos:ignore-block-end\b[^\n]*?\*/|\{#[ \t]*typos:ignore-block-end\b[^\n]*?#\})', |
| 37 | +] |
| 38 | + |
| 39 | +# Before adding an entry in here, consider an in-place marker instead. |
| 40 | +# Every entry below gets a one-line comment saying what the word is. |
| 41 | +[default.extend-words] |
| 42 | +# Accepted variant of "unparsable". Used in stackable-versioned test fixture file |
| 43 | +# names (`unparseable_missing_field.json`), where an in-place marker cannot go. |
| 44 | +unparseable = "unparseable" |
0 commit comments