Try to classify language types

This commit is contained in:
Joshua Peek
2011-07-05 20:48:06 -05:00
parent 6611f174e5
commit 8f46cd0748
4 changed files with 112 additions and 173 deletions

View File

@@ -70,12 +70,9 @@ module Linguist
# Skip vendored or generated blobs
next if blob.vendored? || blob.generated? || blob.language.nil?
# Get language group
language = blob.language.group
# Only include major languages
if language.major?
@sizes[language] += blob.size
# Only include programming languages
if blob.language.type == :programming
@sizes[blob.language.group] += blob.size
end
end