Skip to content

Commit

Permalink
fix(dict): Dont correct common Julia terms
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 17, 2023
1 parent a640285 commit b268587
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
12 changes: 12 additions & 0 deletions crates/typos-cli/src/file_type_specifics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
28 changes: 1 addition & 27 deletions crates/typos-cli/tests/cmd/false-positives.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
bin.name = "typos"
stdin = ""
stdout = """
error: `egal` should be `equal`
--> ./sample.jl:1:7
|
1 | # one egal: ===
| ^^^^
|
error: `egals` should be `equals`
--> ./sample.jl:2:9
|
2 | # three egals: === === ===
| ^^^^^
|
error: `modul` should be `module`
--> ./sample.jl:5:5
|
5 | var modul = \"hello\";
| ^^^^^
|
error: `usig` should be `using`
--> ./sample.jl:6:5
|
6 | var usig = \"hello\";
| ^^^^
|
"""
stdout = ""
stderr = ""
status.code = 2

0 comments on commit b268587

Please sign in to comment.