Merge pull request #1467 from Wilfred/full_examples_in_reference

Use concrete examples in reference.md
This commit is contained in:
Ed Page authored and GitHub committed 2026-01-14 13:45:04 -06:00
commit 837ad2701b
1 file changed
+18 -7
+18 -7
View File
@@ -245,11 +245,22 @@ Run with `--type-list` to see available `NAME`s.
### Example configurations
Common `extend-ignore-re`:
- Line ignore with trailing `# spellchecker:disable-line`: `"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"`
- Line block with `# spellchecker:<on|off>`: `"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on"`
- Next-line ignore `# spellchecker:ignore-next-line`: `(#|//)\\s*spellchecker:ignore-next-line\\n.*`
- See also [ripsecret's regexes](https://github.com/sirwart/ripsecrets/blob/main/src/lib.rs)
```toml
[default]
extend-ignore-re = [
# Ignore lines that end with `# spellchecker:disable-line`
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$",
# Ignore the line after `# spellchecker:ignore-next-line`:
"(#|//)\\s*spellchecker:ignore-next-line\\n.*",
# Ignore blocks between `# spellchecker:off` and `# spellchecker:on`
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
]
extend-ignore-identifiers-re = [
# Ignore identifiers that look like SSL cipher suites:
"\\bTLS_[A-Z0-9_]+(_anon_[A-Z0-9_]+)?\\b",
]
```
Common `extend-ignore-identifiers-re`:
- SSL Cipher suites: `"\\bTLS_[A-Z0-9_]+(_anon_[A-Z0-9_]+)?\\b"`
You may also find the [regexes in
ripscret](https://github.com/sirwart/ripsecrets/blob/main/src/lib.rs)
useful as examples for patterns to ignore.