mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add Unity3D Metadata files as generated
This commit is contained in:
@@ -68,6 +68,7 @@ module Linguist
|
||||
generated_protocol_buffer_go? ||
|
||||
generated_protocol_buffer? ||
|
||||
generated_jni_header? ||
|
||||
generated_unity3d_meta? ||
|
||||
vcr_cassette?
|
||||
end
|
||||
|
||||
@@ -311,5 +312,18 @@ module Linguist
|
||||
return false unless lines.count > 1
|
||||
return lines[0].include?("Generated by Cython")
|
||||
end
|
||||
|
||||
# Internal: Is this a metadata file from Unity3D?
|
||||
#
|
||||
# Unity3D Meta files start with:
|
||||
# fileFormatVersion: X
|
||||
# guid: XXXXXXXXXXXXXXX
|
||||
#
|
||||
# Return true or false
|
||||
def generated_unity3d_meta?
|
||||
return false unless extname == '.meta'
|
||||
return false unless lines.count > 1
|
||||
return lines[0].include?("fileFormatVersion: ")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user