diff --git a/crates/typos-cli/src/default_types.rs b/crates/typos-cli/src/default_types.rs index e64b1a5..b869bb4 100644 --- a/crates/typos-cli/src/default_types.rs +++ b/crates/typos-cli/src/default_types.rs @@ -112,7 +112,6 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[ ("js", &["*.js", "*.jsx", "*.vue"]), ("json", &["*.json"]), ("jsonl", &["*.jsonl"]), - ("julia", &["*.jl"]), ("jupyter", &["*.ipynb", "*.jpynb"]), ("k", &["*.k"]), ("kotlin", &["*.kt", "*.kts"]), @@ -145,7 +144,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[ "OFL-*[0-9]*", ]), ("lilypond", &["*.ly", "*.ily"]), - ("lisp", &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]), + ("lisp", &["*.el", "*.lisp", "*.lsp", "*.sc", "*.scm"]), ("lock", &["*.lock", "package-lock.json", "requirements.txt", "go.sum", "pnpm-lock.yaml"]), ("log", &["*.log"]), ("lua", &["*.lua"]), diff --git a/crates/typos-cli/src/file_type_specifics.rs b/crates/typos-cli/src/file_type_specifics.rs index 273a250..3a69e0f 100644 --- a/crates/typos-cli/src/file_type_specifics.rs +++ b/crates/typos-cli/src/file_type_specifics.rs @@ -16,6 +16,18 @@ pub const TYPE_SPECIFIC_DICTS: &[(&str, StaticDictConfig)] = &[ ignore_words: &[], }, ), + ( + "jl", + StaticDictConfig { + ignore_idents: &[], + ignore_words: &[ + "egal", // name for `===` operator + "egals", // name for `===` operator + "modul", // stand-in for `module` when needing to avoid the keyword + "usig", // stand-in for `using` when needing to avoid the keyword + ], + }, + ), ( "man", StaticDictConfig { diff --git a/crates/typos-cli/tests/cmd/false-positives.in/README.md b/crates/typos-cli/tests/cmd/false-positives.in/README.md index 5871723..1059caa 100644 --- a/crates/typos-cli/tests/cmd/false-positives.in/README.md +++ b/crates/typos-cli/tests/cmd/false-positives.in/README.md @@ -5,3 +5,5 @@ git glossary has both commitish and committish, so don't correct them HTTP_REFERER is a valid HTTP header field It should be reasonable to talk about `` + +SHTTP is a protocol diff --git a/crates/typos-cli/tests/cmd/false-positives.in/sample.jl b/crates/typos-cli/tests/cmd/false-positives.in/sample.jl new file mode 100644 index 0000000..ba7f7a7 --- /dev/null +++ b/crates/typos-cli/tests/cmd/false-positives.in/sample.jl @@ -0,0 +1,6 @@ +# one egal: === +# three egals: === === === + +# When we need to refer to keywords without saying them +var modul = "hello"; +var usig = "hello"; diff --git a/crates/typos-dict/assets/allowed.csv b/crates/typos-dict/assets/allowed.csv index 5203c58..77a19e7 100644 --- a/crates/typos-dict/assets/allowed.csv +++ b/crates/typos-dict/assets/allowed.csv @@ -18,3 +18,4 @@ contiguities,plural of contiguity bellow,valid word and not just a typo of `below` revered,valid word and not just a typoe of `reversed` recuse,valid word despite maybe being a typo of recurse +shttp,also a protocol diff --git a/crates/typos-dict/assets/words.csv b/crates/typos-dict/assets/words.csv index 5795e7a..066db40 100644 --- a/crates/typos-dict/assets/words.csv +++ b/crates/typos-dict/assets/words.csv @@ -52334,7 +52334,6 @@ shtopped,stopped,shopped shtoppes,stops,shops shtopping,stopping,shopping shtops,stops,shops -shttp,https shudown,shutdown shufle,shuffle shuld,should diff --git a/crates/typos-dict/src/word_codegen.rs b/crates/typos-dict/src/word_codegen.rs index 2691efe..1507042 100644 --- a/crates/typos-dict/src/word_codegen.rs +++ b/crates/typos-dict/src/word_codegen.rs @@ -37383,7 +37383,6 @@ pub static WORD_SHT_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict dictgen::InsensitiveStr::Ascii("oppes"), dictgen::InsensitiveStr::Ascii("opping"), dictgen::InsensitiveStr::Ascii("ops"), - dictgen::InsensitiveStr::Ascii("tp"), ], values: &[ &["shitless"], @@ -37396,7 +37395,6 @@ pub static WORD_SHT_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict &["stops", "shops"], &["stopping", "shopping"], &["stops", "shops"], - &["https"], ], range: 2..=6, };