mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-26 02:51:08 -05:00
fix(config): Check project files with language
For `rg`, keeping the file types strict makes sense, For spell checking, `Cargo.toml` is a lot more closely related in handling to `*.rs` than it is to `pyproject.toml` due to ecosystem package names. Part of #362
This commit is contained in:
parent
29ebe5ab48
commit
b7812e616c
1 changed files with 18 additions and 0 deletions
|
@ -176,6 +176,24 @@ impl TypeEngineConfig {
|
|||
..Default::default()
|
||||
},
|
||||
});
|
||||
patterns
|
||||
.entry("rust".into())
|
||||
.or_insert_with(|| GlobEngineConfig {
|
||||
// From a spell-check perspective, these are more closely related to Rust than Toml
|
||||
extend_glob: vec!["Cargo.toml".into()],
|
||||
engine: EngineConfig {
|
||||
..Default::default()
|
||||
},
|
||||
});
|
||||
patterns
|
||||
.entry("python".into())
|
||||
.or_insert_with(|| GlobEngineConfig {
|
||||
// From a spell-check perspective, these are more closely related to Python than Toml
|
||||
extend_glob: vec!["pyproject.toml".into()],
|
||||
engine: EngineConfig {
|
||||
..Default::default()
|
||||
},
|
||||
});
|
||||
patterns.entry("cert".into()).or_insert_with(|| {
|
||||
GlobEngineConfig {
|
||||
extend_glob: vec![
|
||||
|
|
Loading…
Reference in a new issue