Merge pull request #1026 from noahp/noahp/dotall

docs(ref): Add dotall specifier to block ignore
This commit is contained in:
Ed Page 2024-06-04 15:21:32 -05:00 committed by GitHub
commit 160c60dfce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 6 deletions

View file

@ -1,5 +1,5 @@
[default]
extend-ignore-re = ["#\\s*spellchecker:off\\s*\\n.*\\n\\s*#\\s*spellchecker:on"]
extend-ignore-re = ["(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on"]
[default.extend-identifiers]
hello = "goodbye"

View file

@ -1,5 +1,9 @@
hello
# spellchecker:off
hello
# spellchecker:on
henlo
// spellchecker:on
hello
// ensure greedy doesn't exclude everything across blocks
# spellchecker:off
# spellchecker:on

View file

@ -8,9 +8,9 @@ error: `hello` should be `goodbye`
| ^^^^^
|
error: `hello` should be `goodbye`
--> ./file.ignore:5:1
--> ./file.ignore:6:1
|
5 | hello
6 | hello
| ^^^^^
|
"""

View file

@ -39,8 +39,8 @@ Configuration is read from the following (in precedence order)
| 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$"`
- Line block with `# spellchecker:<on|off>`: `"#\\s*spellchecker:off\\s*\\n.*\\n\\s*#\\s*spellchecker:on"`
- 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"`
Common `extend-ignore-identifiers-re`:
- SSL Cipher suites: `"\\bTLS_[A-Z0-9_]+(_anon_[A-Z0-9_]+)?\\b"`