lib/linguist/generated.rb in github-linguist-7.11.0 vs lib/linguist/generated.rb in github-linguist-7.11.1
- old
+ new
@@ -96,11 +96,12 @@
generated_perl_ppport_header? ||
generated_gamemakerstudio? ||
generated_gimp? ||
generated_visualstudio6? ||
generated_haxe? ||
- generated_jooq?
+ generated_jooq? ||
+ generated_pascal_tlb?
end
# Internal: Is the blob an Xcode file?
#
# Generated if the file extension is an Xcode
@@ -238,22 +239,22 @@
# Visual Studio often uses code generation to generate partial classes, and
# these files can be quite unwieldy. Let's hide them.
#
# Returns true or false
def generated_net_designer_file?
- name.downcase =~ /\.designer\.(cs|vb)$/
+ !!name.match(/\.designer\.(cs|vb)$/i)
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.
# Let's hide them.
#
# Returns true or false
def generated_net_specflow_feature_file?
- name.downcase =~ /\.feature\.cs$/
+ !!name.match(/\.feature\.cs$/i)
end
# Internal: Is the blob of JS a parser generated by PEG.js?
#
# PEG.js-generated parsers are not meant to be consumed by humans.
@@ -704,9 +705,19 @@
#
# Return true or false
def generated_jooq?
return false unless extname.downcase == '.java'
lines.first(2).any? { |l| l.include? 'This file is generated by jOOQ.' }
+ end
+
+ # Internal: Is this a generated Delphi Interface file for a type library?
+ #
+ # Delphi Type Library Import tool generates *_TLB.pas files based on .ridl files.
+ # They are not meant to be altered by humans.
+ #
+ # Returns true or false
+ def generated_pascal_tlb?
+ !!name.match(/_tlb\.pas$/i)
end
# Internal: Extract a Hash of name/content pairs from an HTML <meta> tag
def extract_html_meta(match)
(match.last.sub(/\/\Z/, "").strip.scan(/