rubyjedi/soap4r

View on GitHub

Showing 338 of 416 total issues

Class ClassDefCreator has 23 methods (exceeds 20 allowed). Consider refactoring.
Open

class ClassDefCreator
  include ClassDefCreatorSupport
  include XSD::CodeGen

  def initialize(definitions, name_creator, modulepath = nil)
Severity: Minor
Found in lib/wsdl/soap/classDefCreator.rb - About 2 hrs to fix

    Class Definitions has 23 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class Definitions < Info
      attr_reader :name
      attr_reader :targetnamespace
      attr_reader :imports
    
    
    Severity: Minor
    Found in lib/wsdl/definitions.rb - About 2 hrs to fix

      Class Router has 23 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class Router
        include SOAP
      
        attr_reader :actor
        attr_accessor :mapping_registry
      Severity: Minor
      Found in lib/soap/rpc/router.rb - About 2 hrs to fix

        Method parse_elements has 62 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def parse_elements(c, elements, base_namespace, mpath, as_array = false)
            init_lines = []
            init_params = []
            any = false
            elements.each do |element|
        Severity: Major
        Found in lib/wsdl/soap/classDefCreator.rb - About 2 hrs to fix

          Method parse_opt has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

            def parse_opt(getoptlong)
              opt = {}
              wsdl = nil
              begin
                getoptlong.each do |name, arg|
          Severity: Minor
          Found in bin/wsdl2ruby.rb - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Method obj2soap has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

              def obj2soap(obj)
                klass = obj.class
                if map = @obj2soap[klass]
                  map.each do |soap_class, factory, info|
                    ret = factory.obj2soap(soap_class, obj, info, @registry)
          Severity: Minor
          Found in lib/soap/mapping/encodedregistry.rb - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Method decode_soap_envelope has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

            def decode_soap_envelope(ns, ele, attrs, parent)
              o = nil
              if ele.name == EleEnvelope
                o = SOAPEnvelope.new
                if ext = @opt[:external_content]
          Severity: Minor
          Found in lib/soap/parser.rb - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Class Operation has 21 methods (exceeds 20 allowed). Consider refactoring.
          Open

            class Operation
              attr_reader :soapaction
              attr_reader :request_style
              attr_reader :response_style
              attr_reader :request_use
          Severity: Minor
          Found in lib/soap/rpc/proxy.rb - About 2 hrs to fix

            Class Generator has 21 methods (exceeds 20 allowed). Consider refactoring.
            Open

            class Generator
              include SOAP
              include XSD::CodeGen::GenSupport
            
              class FormatEncodeError < Error; end
            Severity: Minor
            Found in lib/soap/generator.rb - About 2 hrs to fix

              Class SOAPArray has 21 methods (exceeds 20 allowed). Consider refactoring.
              Open

              class SOAPArray < XSD::NSDBase
                include SOAPCompoundtype
                include Enumerable
              
              public
              Severity: Minor
              Found in lib/soap/baseData.rb - About 2 hrs to fix

                Method rubytypestruct2obj has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def rubytypestruct2obj(node, info, map, rubytype)
                    klass = rubytype ? Mapping.class_from_name(rubytype) : nil
                    obj = nil
                    case node.type
                    when TYPE_HASH
                Severity: Major
                Found in lib/soap/mapping/rubytypeFactory.rb - About 2 hrs to fix

                  Method create_array_element_definition has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def create_array_element_definition(typedef, mpath)
                      child_type = typedef.child_type
                      child_element = typedef.find_aryelement
                      if child_type == XSD::AnyTypeName
                        type = nil
                  Severity: Minor
                  Found in lib/wsdl/soap/mappingRegistryCreatorSupport.rb - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method parse_attr has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def parse_attr(attr, value)
                      case attr
                      when NamespaceAttrName
                        @namespace = value.source
                        if @content
                  Severity: Minor
                  Found in lib/wsdl/import.rb - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method create_schema_definition has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def self.create_schema_definition(klass, definition)
                      schema_ns = definition[:schema_ns]
                      schema_name = definition[:schema_name]
                      schema_type = definition[:schema_type]
                      is_anonymous = definition[:is_anonymous]
                  Severity: Minor
                  Found in lib/soap/mapping/mapping.rb - About 2 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method dump_porttype has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def dump_porttype(porttype)
                      drivername = porttype.name + @drivername_postfix
                      qname = XSD::QName.new(porttype.namespace, drivername)
                      class_name = mapped_class_basename(qname, @modulepath)
                      defined_const = {}
                  Severity: Minor
                  Found in lib/wsdl/soap/driverCreator.rb - About 1 hr to fix

                    Method screen_data has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def screen_data(value)
                        # "NaN".to_f => 0 in some environment.  libc?
                        if value.is_a?(Float)
                          return value
                        end
                    Severity: Minor
                    Found in lib/xsd/datatypes.rb - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method parse_attr has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def parse_attr(attr, value)
                        case attr
                        when NameAttrName
                          @name = XSD::QName.new(targetnamespace, value.source)
                        when RefAttrName
                    Severity: Minor
                    Found in lib/wsdl/xmlSchema/group.rb - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method const_from_name has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def self.const_from_name(name, lenient = false)
                        const = ::Object
                        name.sub(/\A::/, '').split('::').each do |const_str|
                          if /\A[A-Z]/ =~ const_str
                            begin
                    Severity: Minor
                    Found in lib/soap/mapping/mapping.rb - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method _soap2obj has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def _soap2obj(node, klass = nil)
                        definition = find_node_definition(node)
                        if klass
                          klass_definition = schema_definition_from_class(klass)
                          if definition and (definition.class_for < klass)
                    Severity: Minor
                    Found in lib/soap/mapping/encodedregistry.rb - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method from_obj has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def self.from_obj(obj, namespace = nil)
                        return obj if obj.is_a?(SOAPElement)
                        o = SOAPElement.new(nil)
                        case obj
                        when nil
                    Severity: Minor
                    Found in lib/soap/baseData.rb - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Severity
                    Category
                    Status
                    Source
                    Language