biemond/biemond-orawls

View on GitHub

Showing 67 of 131 total issues

Method opatch has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def opatch(action)
    user                    = resource[:os_user]
    patchName               = resource[:patch_id]
    oracle_product_home_dir = resource[:oracle_product_home_dir]
    jdk_home_dir            = resource[:jdk_home_dir]
Severity: Minor
Found in lib/puppet/provider/opatch/opatch.rb - About 1 hr to fix

    Method domain_partition_control has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def domain_partition_control(action)
        Puppet.debug "domain_partition action: #{action}"
    
        name                      = resource[:domain_partition]
        user                      = resource[:os_user]

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

          def execute_rest(domain, parameters, operation)
            array_size = parameters['attributes'].size
      
            weblogicUser       = domain['weblogic_user']     || 'weblogic'
            weblogicConnectUrl = domain['connect_url']       || 'http://localhost:7001'
      Severity: Minor
      Found in lib/utils/wls_access.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 domain_partition_control has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

        def domain_partition_control(action)
          Puppet.debug "domain_partition action: #{action}"
      
          name                      = resource[:domain_partition]
          user                      = resource[:os_user]

      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 sync has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

            def sync
              event = super()
              # rubocop:disable all
              if property = @resource.property(:enable)
                val = property.retrieve
      Severity: Minor
      Found in lib/puppet/type/wls_ohsserver.rb - About 45 mins 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

      Avoid deeply nested control flow statements.
      Open

                        unless osb == 'empty'
                          osb = osb.strip.downcase
                          if osb.include? target
                            log 'osb_cluster_configured return true'
                            return true
      Severity: Major
      Found in lib/puppet/parser/functions/osb_cluster_configured.rb - About 45 mins to fix

        Method sync has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

              def sync
                event = super()
                # rubocop:disable all
                if property = @resource.property(:enable)
                  val = property.retrieve
        Severity: Minor
        Found in lib/puppet/type/wls_managedserver.rb - About 45 mins 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 patches_in_home has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

          def self.patches_in_home(oracle_product_home_dir, os_user, orainst_dir)
            kernel = Facter.value(:kernel)
            su_shell = kernel == 'Linux' ? '-s /bin/bash' : ''
            full_command  = "#{oracle_product_home_dir}/OPatch/opatch lsinventory -oh #{oracle_product_home_dir} -invPtrLoc #{orainst_dir}/oraInst.loc"
            if Puppet.features.root?
        Severity: Minor
        Found in lib/puppet/provider/wls_opatch/prefetching.rb - About 45 mins 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 sync has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

              def sync
                event = super()
                # rubocop:disable all
                if property = @resource.property(:enable)
                  val = property.retrieve
        Severity: Minor
        Found in lib/puppet/type/bsu_patch.rb - About 45 mins 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 sync has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

              def sync
                event = super()
                # rubocop:disable all
                if property = @resource.property(:enable)
                  val = property.retrieve
        Severity: Minor
        Found in lib/puppet/type/wls_rcu.rb - About 45 mins 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

        Avoid deeply nested control flow statements.
        Open

                        case type
                        when 'jdbc'
                          jdbc =  lookup_wls_var(prefix + '_' + n.to_s + '_jdbc')
                          unless jdbc == 'empty'
                            return true if jdbc.include? wlsObject
        Severity: Major
        Found in lib/puppet/parser/functions/artifact_exists.rb - About 45 mins to fix

          Method change_to_s has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

            def change_to_s(from, to)
              return_value = []
              realm_path = wls_get_realm_path('', provider)
              base_path = "#{realm_path}/AuthenticationProviders/#{resource['authentication_provider_name']}"
              from.keys.each do | property|
          Severity: Minor
          Found in lib/puppet/type/wls_authentication_provider/provider_specific.rb - About 45 mins 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 sync has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

                def sync
                  event = super()
                  # rubocop:disable all
                  if property = @resource.property(:enable)
                    val = property.retrieve
          Severity: Minor
          Found in lib/puppet/type/opatch.rb - About 45 mins 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 sync has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

                def sync
                  event = super()
                  # rubocop:disable all
                  if property = @resource.property(:enable)
                    val = property.retrieve
          Severity: Minor
          Found in lib/puppet/type/wls_adminserver.rb - About 45 mins 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

          Avoid deeply nested control flow statements.
          Open

                            unless bam == 'empty'
                              bam = bam.strip.downcase
                              if bam.include? target
                                log 'bam_cluster_configured return true'
                                return true
          Severity: Major
          Found in lib/puppet/parser/functions/bam_cluster_configured.rb - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                              unless soa == 'empty'
                                soa = soa.strip.downcase
                                if soa.include? target
                                  log 'soa_cluster_configured return true'
                                  return true
            Severity: Major
            Found in lib/puppet/parser/functions/soa_cluster_configured.rb - About 45 mins to fix

              Method sync has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                    def sync
                      event = super()
                      # rubocop:disable all
                      if property = @resource.property(:enable)
                        val = property.retrieve
              Severity: Minor
              Found in lib/puppet/type/wls_domain_partition_control.rb - About 45 mins 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

              Avoid deeply nested control flow statements.
              Open

                                unless jrf == 'empty'
                                  jrf = jrf.strip.downcase
                                  if jrf.include? target
                                    log 'jrf_cluster_configured return true'
                                    return true
              Severity: Major
              Found in lib/puppet/parser/functions/jrf_cluster_configured.rb - About 45 mins to fix

                Method execute_wlst has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def execute_wlst(script, tmpFile, parameters, domain, domainValues, options = {})
                Severity: Minor
                Found in lib/utils/wls_access.rb - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                    unless oim == 'empty'
                                      if oim == 'true'
                                        log 'oim_configured return true'
                                        return true
                                      end
                  Severity: Major
                  Found in lib/puppet/parser/functions/oim_configured.rb - About 45 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language