Hide .designer.cs files

VS creates a bunch of files that, while important to version, are often also
huge and boring. We should suppress them.
This commit is contained in:
Paul Betts
2013-07-11 15:53:10 -07:00
parent 7d594b55e4
commit 4d45f13783

View File

@@ -55,8 +55,9 @@ module Linguist
minified_javascript? ||
compiled_coffeescript? ||
xcode_project_file? ||
generated_net_docfile? ||
generated_parser? ||
generated_net_docfile? ||
generated_net_designer_file? ||
generated_protocol_buffer?
end
@@ -143,6 +144,16 @@ module Linguist
lines[-2].include?("</doc>")
end
# Internal: Is this a codegen file for a .NET project?
#
# 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$/
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.