mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-22 00:51:11 -05:00
fix: Ignore lock files by default
First, this centralizes the concept of lock files, focusing on intent, rather than syntax. We are assuming `requirements.txt` for Python is being used like a regular lock file and not as a dependency specification. Second, we then ignore the content. Though a lock file will generally contain things that could show up in a dependency specification, the large dependency trees make that harder to manage. We still have the dependency specification file which will match with the users code. Fixes #445
This commit is contained in:
parent
560de68f58
commit
e70667ebae
2 changed files with 12 additions and 3 deletions
|
@ -203,6 +203,15 @@ impl TypeEngineConfig {
|
|||
..Default::default()
|
||||
},
|
||||
});
|
||||
patterns
|
||||
.entry("lock".into())
|
||||
.or_insert_with(|| GlobEngineConfig {
|
||||
extend_glob: Vec::new(),
|
||||
engine: EngineConfig {
|
||||
check_file: Some(false),
|
||||
..Default::default()
|
||||
},
|
||||
});
|
||||
patterns.into_iter()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|||
("jinja", &["*.j2", "*.jinja", "*.jinja2"]),
|
||||
("jl", &["*.jl"]),
|
||||
("js", &["*.js", "*.jsx", "*.vue"]),
|
||||
("json", &["*.json", "composer.lock"]),
|
||||
("json", &["*.json"]),
|
||||
("jsonl", &["*.jsonl"]),
|
||||
("julia", &["*.jl"]),
|
||||
("jupyter", &["*.ipynb", "*.jpynb"]),
|
||||
|
@ -146,7 +146,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|||
]),
|
||||
("lilypond", &["*.ly", "*.ily"]),
|
||||
("lisp", &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
|
||||
("lock", &["*.lock", "package-lock.json"]),
|
||||
("lock", &["*.lock", "package-lock.json", "requirements.txt"]),
|
||||
("log", &["*.log"]),
|
||||
("lua", &["*.lua"]),
|
||||
("lz4", &["*.lz4"]),
|
||||
|
@ -262,7 +262,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|||
("textile", &["*.textile"]),
|
||||
("tf", &["*.tf"]),
|
||||
("thrift", &["*.thrift"]),
|
||||
("toml", &["*.toml", "Cargo.lock"]),
|
||||
("toml", &["*.toml"]),
|
||||
("ts", &["*.ts", "*.tsx"]),
|
||||
("twig", &["*.twig"]),
|
||||
("txt", &["*.txt"]),
|
||||
|
|
Loading…
Reference in a new issue