Merge pull request #835 from epage/line-exclude

test: Demo line-ignore behavior
This commit is contained in:
Ed Page 2023-09-26 15:10:58 -05:00 committed by GitHub
commit f301320d47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,5 @@
[default]
extend-ignore-re = ["(?Rm)^.*# spellchecker:disable-line$"]
[default.extend-identifiers]
hello = "goodbye"

View file

@ -0,0 +1,3 @@
hello
hello # spellchecker:disable-line
hello

View 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