Add Unity3D Metadata files as generated

This commit is contained in:
Paul Handly
2015-05-09 13:38:42 -04:00
parent f2af2156fa
commit da5bc18d64
4 changed files with 30 additions and 0 deletions

View File

@@ -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