mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Remove unneded empty blob check
This commit is contained in:
@@ -92,13 +92,11 @@ module Linguist
|
||||
end
|
||||
|
||||
require 'linguist/strategy/filename'
|
||||
require 'linguist/strategy/empty_blob'
|
||||
require 'linguist/strategy/shebang'
|
||||
require 'linguist/strategy/classifier'
|
||||
|
||||
STRATEGIES = [
|
||||
Linguist::Strategy::Filename,
|
||||
Linguist::Strategy::EmptyBlob,
|
||||
Linguist::Strategy::Shebang,
|
||||
Linguist::Heuristics,
|
||||
Linguist::Strategy::Classifier
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
module Linguist
|
||||
module Strategy
|
||||
# Stops detection if the blob contents are empty
|
||||
class EmptyBlob
|
||||
def self.call(blob, langauges)
|
||||
# Return empty array to stop detection
|
||||
[] if blob.data.nil? || blob.data == ""
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user