Teach Generated about Cargo lock files (#4100)

This commit is contained in:
Brayden Banks
2018-04-15 03:04:19 -07:00
committed by Colin Seymour
parent cc4da98616
commit 5363e045bb
4 changed files with 430 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ module Linguist
generated_net_designer_file? ||
generated_net_specflow_feature_file? ||
composer_lock? ||
cargo_lock? ||
node_modules? ||
go_vendor? ||
npm_shrinkwrap_or_package_lock? ||
@@ -378,6 +379,13 @@ module Linguist
!!name.match(/.\.zep\.(?:c|h|php)$/)
end
# Internal: Is the blob a generated Rust Cargo lock file?
#
# Returns true or false.
def cargo_lock?
!!name.match(/Cargo\.lock/)
end
# Is the blob a VCR Cassette file?
#
# Returns true or false

View File

@@ -4594,6 +4594,8 @@ TOML:
type: data
extensions:
- ".toml"
filenames:
- Cargo.lock
tm_scope: source.toml
ace_mode: toml
codemirror_mode: toml