Merge pull request #1342 from epage/next

docs(ref): Include example of ignore-next-line
This commit is contained in:
Ed Page authored and GitHub committed 2025-07-28 17:39:33 -06:00
commit 9cfc11ceb2
4 files changed
+30

No files matched your search

@@ -0,0 +1,5 @@
[default]
extend-ignore-re = ["(#|//)\\s*spellchecker:ignore-next-line\\n.*"]
[default.extend-identifiers]
hello = "goodbye"
@@ -0,0 +1,6 @@
hello
# spellchecker:ignore-next-line
hello
# spellchecker:ignore-next-line
henlo
hello
@@ -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:6:1
|
6 | hello
| ^^^^^
|
"""
stderr = ""
status.code = 2
+1
View File
@@ -44,6 +44,7 @@ Configuration is read from the following (in precedence order)
Common `extend-ignore-re`:
- Line ignore with trailing `# spellchecker:disable-line`: `"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"`
- Line block with `# spellchecker:<on|off>`: `"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on"`
- Next-line ignore `# spellchecker:ignore-next-line`: `(#|//)\\s*spellchecker:ignore-next-line\\n.*`
- See also [ripsecret's regexes](https://github.com/sirwart/ripsecrets/blob/main/src/lib.rs)
Common `extend-ignore-identifiers-re`: