test(cli): Verify block-ignores via regex

This commit is contained in:
Ed Page 2024-04-03 09:10:34 -05:00
parent c4bcca1d18
commit 8b57110b76
3 changed files with 28 additions and 0 deletions

View file

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

View file

@ -0,0 +1,5 @@
hello
# spellchecker:off
hello
# spellchecker:on
hello

View file

@ -0,0 +1,18 @@
bin.name = "typos"
stdin = "--sort"
stdout = """
error: `hello` should be `goodbye`
--> ./file.ignore:1:1
|
1 | hello
| ^^^^^
|
error: `hello` should be `goodbye`
--> ./file.ignore:5:1
|
5 | hello
| ^^^^^
|
"""
stderr = ""
status.code = 2