mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Exclude files over 0.1MB from searches
This commit is contained in:
@@ -209,13 +209,16 @@ module Linguist
|
||||
# Public: Should the blob be indexed for searching?
|
||||
#
|
||||
# Excluded:
|
||||
# - Files over 0.1MB
|
||||
# - Non-text files
|
||||
# - Generated source files
|
||||
# - .po and .sql files
|
||||
#
|
||||
# Return true or false
|
||||
def indexable?
|
||||
if !text?
|
||||
if size > 100 * 1024
|
||||
false
|
||||
elsif !text?
|
||||
false
|
||||
elsif generated?
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user