mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Teach Generated about Cargo lock files (#4100)
This commit is contained in:
committed by
Colin Seymour
parent
cc4da98616
commit
5363e045bb
@@ -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
|
||||
|
||||
@@ -4594,6 +4594,8 @@ TOML:
|
||||
type: data
|
||||
extensions:
|
||||
- ".toml"
|
||||
filenames:
|
||||
- Cargo.lock
|
||||
tm_scope: source.toml
|
||||
ace_mode: toml
|
||||
codemirror_mode: toml
|
||||
|
||||
Reference in New Issue
Block a user