Add a few frequent filetypes

This commit is contained in:
ariasuni 2019-10-03 22:40:33 +02:00
parent 89c861f24d
commit efbd46351c

View File

@ -20,10 +20,13 @@ impl FileExtensions {
/// in order to kick off the build of a project. Its usually only present
/// in directories full of source code.
fn is_immediate(&self, file: &File) -> bool {
file.name.to_lowercase().starts_with("readme") || file.name_is_one_of( &[
file.name.to_lowercase().starts_with("readme") ||
file.name.ends_with(".ninja") ||
file.name_is_one_of( &[
"Makefile", "Cargo.toml", "SConstruct", "CMakeLists.txt",
"build.gradle", "Rakefile", "Gruntfile.js",
"Gruntfile.coffee", "BUILD", "BUILD.bazel", "WORKSPACE", "build.xml"
"build.gradle", "Rakefile", "package.json", "Gruntfile.js",
"Gruntfile.coffee", "BUILD", "BUILD.bazel", "WORKSPACE", "build.xml",
"webpack.config.js", "meson.build",
])
}
@ -74,7 +77,7 @@ impl FileExtensions {
file.extension_is_one_of( &[
"zip", "tar", "Z", "z", "gz", "bz2", "a", "ar", "7z",
"iso", "dmg", "tc", "rar", "par", "tgz", "xz", "txz",
"lzma", "deb", "rpm", "zst",
"lz", "tlz", "lzma", "deb", "rpm", "zst",
])
}