rubyjedi/soap4r

View on GitHub

Showing 416 of 416 total issues

File datatypes.rb has 1139 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'xsd/qname'
require 'xsd/charset'
require 'soap/nestedexception'
require 'uri'

Severity: Major
Found in lib/xsd/datatypes.rb - About 2 days to fix

    File baseData.rb has 868 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'xsd/datatypes'
    require 'soap/soap'
    require 'xsd/codegen/gensupport'
    require 'soap/mapping/mapping'
    
    
    Severity: Major
    Found in lib/soap/baseData.rb - About 2 days to fix

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

        def obj2soap(soap_class, obj, info, map)
          param = nil
      
          case obj
          when ::String
      Severity: Minor
      Found in lib/soap/mapping/rubytypeFactory.rb - About 1 day 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

      File router.rb has 554 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require 'soap/soap'
      require 'soap/processor'
      require 'soap/mapping'
      require 'soap/mapping/literalregistry'
      require 'soap/rpc/rpc'
      Severity: Major
      Found in lib/soap/rpc/router.rb - About 1 day to fix

        File mapping.rb has 500 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require 'xsd/codegen/gensupport'
        require 'soap/mapping/schemadefinition'
        
        
        module SOAP
        Severity: Minor
        Found in lib/soap/mapping/mapping.rb - About 1 day to fix

          File proxy.rb has 499 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require 'soap/soap'
          require 'soap/processor'
          require 'soap/mapping'
          require 'soap/mapping/literalregistry'
          require 'soap/rpc/rpc'
          Severity: Minor
          Found in lib/soap/rpc/proxy.rb - About 1 day to fix

            File encodedregistry.rb has 481 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            FixnumShim = 1.class
            FIXNUM_PRESENT = FixnumShim.name == 'Fixnum'
            BignumShim = (10**20).class
            BIGNUM_PRESENT = BignumShim.name == 'Bignum'
            
            
            Severity: Minor
            Found in lib/soap/mapping/encodedregistry.rb - About 7 hrs to fix

              File soapHandler.rb has 476 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              require 'soap/encodingstyle/handler'
              require 'soap/mapping/registry'
              
              
              module SOAP
              Severity: Minor
              Found in lib/soap/encodingstyle/soapHandler.rb - About 7 hrs to fix

                Method obj2soap has 178 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def obj2soap(soap_class, obj, info, map)
                    param = nil
                
                    case obj
                    when ::String
                Severity: Major
                Found in lib/soap/mapping/rubytypeFactory.rb - About 7 hrs to fix

                  File rubytypeFactory.rb has 416 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  old_verbose, $VERBOSE = $VERBOSE, nil # silence warnings
                  DATA_PRESENT = defined?(Data)
                  DataShim = Kernel.const_get('Data') if DATA_PRESENT
                  $VERBOSE = old_verbose
                  
                  
                  Severity: Minor
                  Found in lib/soap/mapping/rubytypeFactory.rb - About 6 hrs to fix

                    Method collect_fault_messages has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def collect_fault_messages
                        result = []
                        porttypes.each do |porttype|
                          port_binding = porttype.find_binding()
                          next unless port_binding
                    Severity: Minor
                    Found in lib/wsdl/soap/definitions.rb - About 5 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_elements has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def parse_elements(elements, base_namespace, mpath, opt)
                        schema_element = []
                        any = false
                        elements.each do |element|
                          case element
                    Severity: Minor
                    Found in lib/wsdl/soap/mappingRegistryCreatorSupport.rb - About 5 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

                    File classDefCreator.rb has 385 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require 'wsdl/data'
                    require 'wsdl/soap/classDefCreatorSupport'
                    require 'xsd/codegen'
                    require 'set'
                    
                    
                    Severity: Minor
                    Found in lib/wsdl/soap/classDefCreator.rb - About 5 hrs to fix

                      Method parse_elements has a Cognitive Complexity of 34 (exceeds 5 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: Minor
                      Found in lib/wsdl/soap/classDefCreator.rb - About 5 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 Property has 36 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Property
                        unless defined?(FrozenError) # defined since 2.5
                          FrozenError = (RUBY_VERSION >= "1.9.0") ? RuntimeError : TypeError
                        end
                      
                      
                      Severity: Minor
                      Found in lib/soap/property.rb - About 4 hrs to fix

                        Method dump has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                        Open

                          def dump
                            buf = ""
                            unless @requirepath.empty?
                              buf << dump_requirepath 
                            end
                        Severity: Minor
                        Found in lib/xsd/codegen/classdef.rb - About 4 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

                        File literalregistry.rb has 333 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        require 'soap/baseData'
                        require 'soap/mapping/mapping'
                        require 'soap/mapping/typeMap'
                        require 'xsd/codegen/gensupport'
                        require 'xsd/namedelements'
                        Severity: Minor
                        Found in lib/soap/mapping/literalregistry.rb - About 4 hrs to fix

                          File mappingRegistryCreatorSupport.rb has 330 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          require 'wsdl/soap/classDefCreatorSupport'
                          
                          
                          module WSDL
                          module SOAP
                          Severity: Minor
                          Found in lib/wsdl/soap/mappingRegistryCreatorSupport.rb - About 3 hrs to fix

                            Method dump has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def dump(type = nil)
                                result = "require 'xsd/qname'\n"
                                # cannot use @modulepath because of multiple classes
                                if @modulepath
                                  result << "\n"
                            Severity: Minor
                            Found in lib/wsdl/soap/classDefCreator.rb - About 3 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 encode_attrs has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def encode_attrs(generator, ns, data, parent)
                                attrs = {}
                                return attrs if data.is_a?(SOAPReference)
                            
                                if !parent || parent.encodingstyle != EncodingNamespace
                            Severity: Minor
                            Found in lib/soap/encodingstyle/soapHandler.rb - About 3 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

                            Severity
                            Category
                            Status
                            Source
                            Language