diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 7fbf8a96..35c58c30 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -32,13 +32,6 @@ module Linguist # Valid Languages types TYPES = [:data, :markup, :programming, :prose] - # Names of non-programming languages that we will still detect - # - # Returns an array - def self.detectable_markup - ["CSS", "Less", "Sass", "SCSS", "Stylus", "TeX"] - end - # Detect languages by a specific type # # type - A symbol that exists within TYPES diff --git a/lib/linguist/repository.rb b/lib/linguist/repository.rb index 41e829c5..3c197fad 100644 --- a/lib/linguist/repository.rb +++ b/lib/linguist/repository.rb @@ -8,6 +8,8 @@ module Linguist # Its primary purpose is for gathering language statistics across # the entire project. class Repository + DETECTABLE_TYPES = [:programming, :markup].freeze + attr_reader :repository # Public: Create a new Repository based on the stats of @@ -159,8 +161,7 @@ module Linguist # Skip vendored or generated blobs next if blob.vendored? || blob.generated? || blob.language.nil? - # Only include programming languages and acceptable markup languages - if blob.language.type == :programming || Language.detectable_markup.include?(blob.language.name) + if DETECTABLE_TYPES.include?(blob.language.type) file_map[new] = [blob.language.group.name, blob.size] end end