|
| 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 | + # Vendored fork of antora-ui-default (see ui/UPSTREAM). Kept free of markers |
| 13 | + # so upstream syncs stay clean. |
| 14 | + "ui/", |
| 15 | +] |
| 16 | + |
| 17 | +[default] |
| 18 | +# typos has no native suppression directive |
| 19 | +# (https://github.com/crate-ci/typos/issues/316), so these regexes provide one. |
| 20 | +# A marker must sit in a comment: after `#`, `//` or `;` (free text may follow), |
| 21 | +# or inside a closed `<!-- -->`, `/* */` or `{# #}` (free text may precede the |
| 22 | +# closer). An unterminated `typos:ignore-block-start` suppresses nothing. |
| 23 | +# |
| 24 | +# Use one of the following when the word is correct at one place but would still be a typo elsewhere: |
| 25 | +# |
| 26 | +# # typos:ignore-line at the end of the line it applies to |
| 27 | +# # typos:ignore-next-line on its own line, above the offending line |
| 28 | +# # typos:ignore-block-start / typos:ignore-block-end around a block |
| 29 | +extend-ignore-re = [ |
| 30 | + '(?Rm)^.*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-line\b.*|(?:<!--[ \t]*typos:ignore-line\b.*?-->|/\*[ \t]*typos:ignore-line\b.*?\*/|\{#[ \t]*typos:ignore-line\b.*?#\})[ \t]*)$', |
| 31 | + '(?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.*$', |
| 32 | + '(?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]*?#\})', |
| 33 | + # Random draw.io etags, in `.drawio` (`etag="..."`) and `.drawio.svg` |
| 34 | + # (`etag="..."`) files. Diagram labels stay checked. |
| 35 | + 'etag=(?:"|")[^"&]*', |
| 36 | + # Spark's bundled ALS (Alternating Least Squares) example class, in YAML |
| 37 | + # listing blocks where a marker would render verbatim. |
| 38 | + 'org\.apache\.spark\.examples\.SparkALS', |
| 39 | +] |
| 40 | + |
| 41 | +# Before adding an entry in here, consider an in-place marker instead. |
| 42 | +# Every entry below gets a one-line comment saying what the word is. |
| 43 | +[default.extend-words] |
| 44 | +# Azure Kubernetes Service |
| 45 | +aks = "aks" |
0 commit comments