mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Add Apache thrift support to generated? check
This commit is contained in:
@@ -67,6 +67,7 @@ module Linguist
|
|||||||
compiled_cython_file? ||
|
compiled_cython_file? ||
|
||||||
generated_protocol_buffer_go? ||
|
generated_protocol_buffer_go? ||
|
||||||
generated_protocol_buffer? ||
|
generated_protocol_buffer? ||
|
||||||
|
generated_apache_thrift? ||
|
||||||
generated_jni_header? ||
|
generated_jni_header? ||
|
||||||
vcr_cassette?
|
vcr_cassette?
|
||||||
end
|
end
|
||||||
@@ -248,6 +249,13 @@ module Linguist
|
|||||||
|
|
||||||
return lines[0].include?("Generated by the protocol buffer compiler. DO NOT EDIT!")
|
return lines[0].include?("Generated by the protocol buffer compiler. DO NOT EDIT!")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Internal: Is the blob generated by Apache Thrift compiler?
|
||||||
|
#
|
||||||
|
# Returns true or false
|
||||||
|
def generated_apache_thrift?
|
||||||
|
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?
|
# Internal: Is the blob a C/C++ header generated by the Java JNI tool javah?
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user