Fix conflicts from merging master into 'mod-extension'

This commit is contained in:
Paul Chaignon
2015-07-04 18:01:56 +02:00
130 changed files with 24053 additions and 160 deletions

View File

@@ -65,11 +65,13 @@ module Linguist
generated_net_docfile? ||
generated_postscript? ||
compiled_cython_file? ||
generated_protocol_buffer_go? ||
generated_go? ||
generated_protocol_buffer? ||
generated_apache_thrift? ||
generated_jni_header? ||
vcr_cassette? ||
generated_module?
generated_module? ||
generated_unity3d_meta?
end
# Internal: Is the blob an Xcode file?
@@ -180,11 +182,11 @@ module Linguist
def generated_net_designer_file?
name.downcase =~ /\.designer\.cs$/
end
# Internal: Is this a codegen file for Specflow feature file?
#
# Visual Studio's SpecFlow extension generates *.feature.cs files
# from *.feature files, they are not meant to be consumed by humans.
# from *.feature files, they are not meant to be consumed by humans.
# Let's hide them.
#
# Returns true or false
@@ -232,11 +234,11 @@ module Linguist
creator.include?("ImageMagick")
end
def generated_protocol_buffer_go?
def generated_go?
return false unless extname == '.go'
return false unless lines.count > 1
return lines[0].include?("Code generated by protoc-gen-go")
return lines[0].include?("Code generated by")
end
# Internal: Is the blob a C++, Java or Python source file generated by the
@@ -250,6 +252,16 @@ module Linguist
return lines[0].include?("Generated by the protocol buffer compiler. DO NOT EDIT!")
end
# Internal: Is the blob generated by Apache Thrift compiler?
#
# Returns true or false
def generated_apache_thrift?
return false unless ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp'].include?(extname)
return false unless lines.count > 1
return lines[0].include?("Autogenerated by Thrift Compiler") || lines[1].include?("Autogenerated by Thrift Compiler")
end
# Internal: Is the blob a C/C++ header generated by the Java JNI tool javah?
#
# Returns true of false.
@@ -329,6 +341,18 @@ module Linguist
return false unless lines.count > 1
return lines[0].include?("PCBNEW-LibModule-V") ||
lines[0].include?("GFORTRAN module version '")
# 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