File tree Expand file tree Collapse file tree 4 files changed +30
-0
lines changed
crates/typos-cli/tests/cmd Expand file tree Collapse file tree 4 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ [default ]
2+ extend-ignore-re = [" (#|//)\\ s*spellchecker:ignore-next-line\\ n.*" ]
3+
4+ [default .extend-identifiers ]
5+ hello = " goodbye"
Original file line number Diff line number Diff line change 1+ hello
2+ # spellchecker:ignore-next-line
3+ hello
4+ # spellchecker:ignore-next-line
5+ henlo
6+ hello
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ Configuration is read from the following (in precedence order)
4444Common ` 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
4950Common ` extend-ignore-identifiers-re ` :
You can’t perform that action at this time.
0 commit comments