mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-26 02:51:08 -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()
|
..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()
|
patterns.into_iter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
||||||
("jinja", &["*.j2", "*.jinja", "*.jinja2"]),
|
("jinja", &["*.j2", "*.jinja", "*.jinja2"]),
|
||||||
("jl", &["*.jl"]),
|
("jl", &["*.jl"]),
|
||||||
("js", &["*.js", "*.jsx", "*.vue"]),
|
("js", &["*.js", "*.jsx", "*.vue"]),
|
||||||
("json", &["*.json", "composer.lock"]),
|
("json", &["*.json"]),
|
||||||
("jsonl", &["*.jsonl"]),
|
("jsonl", &["*.jsonl"]),
|
||||||
("julia", &["*.jl"]),
|
("julia", &["*.jl"]),
|
||||||
("jupyter", &["*.ipynb", "*.jpynb"]),
|
("jupyter", &["*.ipynb", "*.jpynb"]),
|
||||||
|
@ -146,7 +146,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
||||||
]),
|
]),
|
||||||
("lilypond", &["*.ly", "*.ily"]),
|
("lilypond", &["*.ly", "*.ily"]),
|
||||||
("lisp", &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
|
("lisp", &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
|
||||||
("lock", &["*.lock", "package-lock.json"]),
|
("lock", &["*.lock", "package-lock.json", "requirements.txt"]),
|
||||||
("log", &["*.log"]),
|
("log", &["*.log"]),
|
||||||
("lua", &["*.lua"]),
|
("lua", &["*.lua"]),
|
||||||
("lz4", &["*.lz4"]),
|
("lz4", &["*.lz4"]),
|
||||||
|
@ -262,7 +262,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
||||||
("textile", &["*.textile"]),
|
("textile", &["*.textile"]),
|
||||||
("tf", &["*.tf"]),
|
("tf", &["*.tf"]),
|
||||||
("thrift", &["*.thrift"]),
|
("thrift", &["*.thrift"]),
|
||||||
("toml", &["*.toml", "Cargo.lock"]),
|
("toml", &["*.toml"]),
|
||||||
("ts", &["*.ts", "*.tsx"]),
|
("ts", &["*.ts", "*.tsx"]),
|
||||||
("twig", &["*.twig"]),
|
("twig", &["*.twig"]),
|
||||||
("txt", &["*.txt"]),
|
("txt", &["*.txt"]),
|
||||||
|
|
Loading…
Reference in a new issue