lazebny/ramda-ruby

View on GitHub

Showing 5 of 12 total issues

File list.rb has 323 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require_relative 'internal/curried_method'
require_relative 'internal/dispatchable'
require_relative 'internal/transducers'
 
module Ramda
Severity: Minor
Found in lib/ramda/list.rb - About 3 hrs to fix

    Method curried_method_body has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    def curried_method_body(name, arity, &block)
    Ramda::Internal::FunctionWithArity.call(arity) do |*args|
    begin
    if args.index(Ramda.__)
    replace_placeholder(args, &block).curry
    Severity: Minor
    Found in lib/ramda/internal/curried_method.rb - About 1 hr to fix

    Method __make_curry_proc__ has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def __make_curry_proc__(proc, passed, arity)
    is_lambda = proc.lambda?
    passed.freeze
     
    __send__((is_lambda ? :lambda : :proc)) do |*argv, &passed_proc|
    Severity: Minor
    Found in lib/ramda/internal/java/__make_curry_proc__.rb - About 1 hr to fix

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

    def dispatchable(method_names, described_types, xf = nil, &fn)
    method_names = Array(method_names)
     
    FunctionWithArity.call(fn.arity) do |*args, xs|
    case xs
    Severity: Minor
    Found in lib/ramda/internal/dispatchable.rb - About 25 mins to fix

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

    def dispatchable1(method_names, described_types, xf = nil, &fn)
    method_names = Array(method_names)
     
    FunctionWithArity.call(fn.arity) do |xs|
    case xs
    Severity: Minor
    Found in lib/ramda/internal/dispatchable.rb - About 25 mins to fix
    Severity
    Category
    Status
    Source
    Language