biemond/biemond-orawls

View on GitHub

Showing 67 of 131 total issues

Method get_domain has 542 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def get_domain(domain_path, n)
  prefix = 'ora_mdw'
  domainfile = domain_path + '/config/config.xml'

  return if FileTest.exists?(domainfile) == false
Severity: Major
Found in lib/facter/orawls.rb - About 2 days to fix

    Method get_domain has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
    Open

    def get_domain(domain_path, n)
      prefix = 'ora_mdw'
      domainfile = domain_path + '/config/config.xml'
    
      return if FileTest.exists?(domainfile) == false
    Severity: Minor
    Found in lib/facter/orawls.rb - About 2 days 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 orawls.rb has 739 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'rexml/document'
    require 'facter'
    require 'yaml'
    
    def get_weblogic_user
    Severity: Major
    Found in lib/facter/orawls.rb - About 1 day to fix

      File wls_access.rb has 306 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require 'tempfile'
      require 'fileutils'
      require 'utils/settings'
      require 'utils/wls_daemon'
      
      
      Severity: Minor
      Found in lib/utils/wls_access.rb - About 3 hrs to fix

        Method execute_rest has 73 lines of code (exceeds 25 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: Major
        Found in lib/utils/wls_access.rb - About 2 hrs to fix

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

            def ohsserver_status
              domain_name                 = resource[:domain_name]
              name                        = resource[:server_name]
              user                        = resource[:os_user]
              domain_path                 = resource[:domain_path]
          Severity: Minor
          Found in lib/puppet/provider/wls_ohsserver/wls_ohsserver.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 opatch_status has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

            def opatch_status
              user                    = resource[:os_user]
              patchName               = resource[:patch_id]
              oracle_product_home_dir = resource[:oracle_product_home_dir]
              orainst_dir             = resource[:orainst_dir]
          Severity: Minor
          Found in lib/puppet/provider/opatch/opatch.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 bsu_patch has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

            def bsu_patch(action)
              user                = resource[:os_user]
              patch_name           = resource[:name]
              middleware_home_dir = resource[:middleware_home_dir]
              weblogic_home_dir   = resource[:weblogic_home_dir]
          Severity: Minor
          Found in lib/puppet/provider/bsu_patch/bsu_patch.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 bsu_status has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

            def bsu_status
              user                = resource[:os_user]
              patch_name           = resource[:name]
              middleware_home_dir = resource[:middleware_home_dir]
              weblogic_home_dir   = resource[:weblogic_home_dir]
          Severity: Minor
          Found in lib/puppet/provider/bsu_patch/bsu_patch.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 opatch has a Cognitive Complexity of 16 (exceeds 5 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 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 rcu_status has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
          Open

            def rcu_status
              Puppet.debug 'rcu_status'
          
              jdbcurl      = resource[:jdbc_url]
              sysuser      = resource[:sys_user]
          Severity: Minor
          Found in lib/puppet/provider/wls_rcu/wls_rcu.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 adminserver_status has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
          Open

            def adminserver_status
              domain_name    = resource[:domain_name]
              name           = resource[:server_name]
          
              kernel = Facter.value(:kernel)
          Severity: Minor
          Found in lib/puppet/provider/wls_adminserver/wls_adminserver.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 adminserver_control has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def adminserver_control(action)
              Puppet.debug "adminserver action: #{action}"
          
              domain_name                 = resource[:domain_name]
              domain_path                 = resource[:domain_path]
          Severity: Minor
          Found in lib/puppet/provider/wls_adminserver/wls_adminserver.rb - About 2 hrs to fix

            Method ohsserver_control has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def ohsserver_control(action)
                Puppet.debug "ohs server action: #{action}"
            
                domain_name                 = resource[:domain_name]
                domain_path                 = resource[:domain_path]
            Severity: Minor
            Found in lib/puppet/provider/wls_ohsserver/wls_ohsserver.rb - About 2 hrs to fix

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

                def adminserver_control(action)
                  Puppet.debug "adminserver action: #{action}"
              
                  domain_name                 = resource[:domain_name]
                  domain_path                 = resource[:domain_path]
              Severity: Minor
              Found in lib/puppet/provider/wls_adminserver/wls_adminserver.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 ohsserver_control has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                def ohsserver_control(action)
                  Puppet.debug "ohs server action: #{action}"
              
                  domain_name                 = resource[:domain_name]
                  domain_path                 = resource[:domain_path]
              Severity: Minor
              Found in lib/puppet/provider/wls_ohsserver/wls_ohsserver.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 controller has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def controller(content, parameters = {})
                    action = ''
                    unless parameters.nil?
                      action = parameters['action']
                      Puppet.info "Executing: action #{action}"
              Severity: Minor
              Found in lib/utils/wls_access.rb - About 1 hr to fix

                Method wlst has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def wlst(content, parameters = {})
                      script = 'wlstScript'
                      action = ''
                      unless parameters.nil?
                        action = parameters['action']
                Severity: Minor
                Found in lib/utils/wls_access.rb - About 1 hr to fix

                  Method execute_wlst has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def execute_wlst(script, tmpFile, parameters, domain, domainValues, options = {})
                        operatingSystemUser          = domainValues['user']              || 'oracle'
                        weblogicHomeDir              = domainValues['weblogic_home_dir']
                        weblogicUser                 = domainValues['weblogic_user']     || 'weblogic'
                        weblogicConnectUrl           = domainValues['connect_url']       || 't3://localhost:7001'
                  Severity: Minor
                  Found in lib/utils/wls_access.rb - About 1 hr to fix

                    Method execute_wlst has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def execute_wlst(script, tmpFile, parameters, domain, domainValues, options = {})
                          operatingSystemUser          = domainValues['user']              || 'oracle'
                          weblogicHomeDir              = domainValues['weblogic_home_dir']
                          weblogicUser                 = domainValues['weblogic_user']     || 'weblogic'
                          weblogicConnectUrl           = domainValues['connect_url']       || 't3://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

                    Severity
                    Category
                    Status
                    Source
                    Language