nbulaj/proxy_fetcher

View on GitHub

Showing 5 of 5 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module Providers
# FreeProxyListUS provider class.
class FreeProxyListUS < Base
# Provider URL to fetch proxy list
def provider_url
Severity: Major
Found in lib/proxy_fetcher/providers/free_proxy_list_us.rb and 1 other location - About 1 hr to fix
lib/proxy_fetcher/providers/free_proxy_list.rb on lines 4..52

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module Providers
# FreeProxyList provider class.
class FreeProxyList < Base
# Provider URL to fetch proxy list
def provider_url
Severity: Major
Found in lib/proxy_fetcher/providers/free_proxy_list.rb and 1 other location - About 1 hr to fix
lib/proxy_fetcher/providers/free_proxy_list_us.rb on lines 4..52

Method validate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

def validate
target_proxies = @proxies.dup
target_proxies_lock = Mutex.new
connectable_proxies = []
connectable_proxies_lock = Mutex.new
Severity: Minor
Found in lib/proxy_fetcher/utils/proxy_list_validator.rb - About 1 hr to fix

Method request_with_payload has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def request_with_payload(method, url, payload, headers, options)
Severity: Minor
Found in lib/proxy_fetcher/client/client.rb - About 35 mins to fix

    Method lookup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def lookup(name_or_class)
    raise Exceptions::BlankAdapter if name_or_class.nil? || name_or_class.to_s.empty?
     
    case name_or_class
    when Symbol, String
    Severity: Minor
    Found in lib/proxy_fetcher/document/adapters.rb - About 25 mins to fix
    Severity
    Category
    Status
    Source
    Language