diff --git a/crates/typos-cli/tests/cmd/ignore-line.in/_typos.toml b/crates/typos-cli/tests/cmd/ignore-line.in/_typos.toml new file mode 100644 index 0000000..3a12b41 --- /dev/null +++ b/crates/typos-cli/tests/cmd/ignore-line.in/_typos.toml @@ -0,0 +1,5 @@ +[default] +extend-ignore-re = ["(?Rm)^.*# spellchecker:disable-line$"] + +[default.extend-identifiers] +hello = "goodbye" diff --git a/crates/typos-cli/tests/cmd/ignore-line.in/file.ignore b/crates/typos-cli/tests/cmd/ignore-line.in/file.ignore new file mode 100644 index 0000000..bfc4123 --- /dev/null +++ b/crates/typos-cli/tests/cmd/ignore-line.in/file.ignore @@ -0,0 +1,3 @@ +hello +hello # spellchecker:disable-line +hello diff --git a/crates/typos-cli/tests/cmd/ignore-line.toml b/crates/typos-cli/tests/cmd/ignore-line.toml new file mode 100644 index 0000000..715b2d5 --- /dev/null +++ b/crates/typos-cli/tests/cmd/ignore-line.toml @@ -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