lib/linguist/generated.rb in github-linguist-7.7.0 vs lib/linguist/generated.rb in github-linguist-7.8.0

- old
+ new

@@ -91,11 +91,12 @@ generated_jison? || generated_grpc_cpp? || generated_dart? || generated_perl_ppport_header? || generated_gamemakerstudio? || - generated_gimp? + generated_gimp? || + generated_visualstudio6? end # Internal: Is the blob an Xcode file? # # Generated if the file extension is an Xcode @@ -614,9 +615,17 @@ def generated_gimp? return false unless ['.c', '.h'].include? extname return false unless lines.count > 0 return lines[0].match(/\/\* GIMP [a-zA-Z0-9\- ]+ C\-Source image dump \(.+?\.c\) \*\//) || lines[0].match(/\/\* GIMP header image file format \([a-zA-Z0-9\- ]+\)\: .+?\.h \*\//) + end + + # Internal: Is this a generated Microsoft Visual Studio 6.0 build file? + # + # Return true or false + def generated_visualstudio6? + return false unless extname.downcase == '.dsp' + lines.first(3).any? { |l| l.include? '# Microsoft Developer Studio Generated Build File' } end # Internal: Is this a generated HTML file? # # HTML documents generated by authoring tools often include a