Skip to content

Commit

Permalink
test: Demo line-ignore behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Sep 26, 2023
1 parent c9d894f commit 8575458
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/typos-cli/tests/cmd/ignore-line.in/_typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[default]
extend-ignore-re = ["(?m)^.*# spellchecker:disable-line$"]

[default.extend-identifiers]
hello = "goodbye"
3 changes: 3 additions & 0 deletions crates/typos-cli/tests/cmd/ignore-line.in/file.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
hello
hello # spellchecker:disable-line
hello
18 changes: 18 additions & 0 deletions crates/typos-cli/tests/cmd/ignore-line.toml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8575458

Please sign in to comment.