mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-21 16:41:01 -05:00
test: Demo line-ignore behavior
This commit is contained in:
parent
c9d894f3c4
commit
21dba19dec
3 changed files with 26 additions and 0 deletions
5
crates/typos-cli/tests/cmd/ignore-line.in/_typos.toml
Normal file
5
crates/typos-cli/tests/cmd/ignore-line.in/_typos.toml
Normal file
|
@ -0,0 +1,5 @@
|
|||
[default]
|
||||
extend-ignore-re = ["(?Rm)^.*# spellchecker:disable-line$"]
|
||||
|
||||
[default.extend-identifiers]
|
||||
hello = "goodbye"
|
3
crates/typos-cli/tests/cmd/ignore-line.in/file.ignore
Normal file
3
crates/typos-cli/tests/cmd/ignore-line.in/file.ignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
hello
|
||||
hello # spellchecker:disable-line
|
||||
hello
|
18
crates/typos-cli/tests/cmd/ignore-line.toml
Normal file
18
crates/typos-cli/tests/cmd/ignore-line.toml
Normal file
|
@ -0,0 +1,18 @@
|
|||
bin.name = "typos"
|
||||
stdin = ""
|
||||
stdout = """
|
||||
error: `hello` should be `goodbye`
|
||||
--> ./file.ignore:1:1
|
||||
|
|
||||
1 | hello
|
||||
| ^^^^^
|
||||
|
|
||||
error: `hello` should be `goodbye`
|
||||
--> ./file.ignore:3:1
|
||||
|
|
||||
3 | hello
|
||||
| ^^^^^
|
||||
|
|
||||
"""
|
||||
stderr = ""
|
||||
status.code = 2
|
Loading…
Reference in a new issue