mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-25 10:31:02 -05:00
Merge pull request #835 from epage/line-exclude
test: Demo line-ignore behavior
This commit is contained in:
commit
f301320d47
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