Skip to content

Commit 987c365

Browse files
committed
docs(ref): Include example of ignore-next-line
1 parent d7e6241 commit 987c365

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[default]
2+
extend-ignore-re = ["(#|//)\\s*spellchecker:ignore-next-line\\n.*"]
3+
4+
[default.extend-identifiers]
5+
hello = "goodbye"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
hello
2+
# spellchecker:ignore-next-line
3+
hello
4+
# spellchecker:ignore-next-line
5+
henlo
6+
hello
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
bin.name = "typos"
2+
stdin = "--sort"
3+
stdout = """
4+
error: `hello` should be `goodbye`
5+
--> ./file.ignore:1:1
6+
|
7+
1 | hello
8+
| ^^^^^
9+
|
10+
error: `hello` should be `goodbye`
11+
--> ./file.ignore:6:1
12+
|
13+
6 | hello
14+
| ^^^^^
15+
|
16+
"""
17+
stderr = ""
18+
status.code = 2

docs/reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Configuration is read from the following (in precedence order)
4444
Common `extend-ignore-re`:
4545
- Line ignore with trailing `# spellchecker:disable-line`: `"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"`
4646
- Line block with `# spellchecker:<on|off>`: `"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on"`
47+
- Next-line ignore `# spellchecker:ignore-next-line`: `(#|//)\\s*spellchecker:ignore-next-line\\n.*`
4748
- See also [ripsecret's regexes](https://github.com/sirwart/ripsecrets/blob/main/src/lib.rs)
4849

4950
Common `extend-ignore-identifiers-re`:

0 commit comments

Comments
 (0)