biemond/biemond-orawls

View on GitHub

Showing 67 of 131 total issues

Method controller has a Cognitive Complexity of 14 (exceeds 5 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

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

  def domain_partition_control_status
    name                = resource[:domain_partition]
    user                = resource[:os_user]
    middleware_home_dir = resource[:middleware_home_dir]
    weblogic_user       = resource[:weblogic_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 prefetch has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

  def self.prefetch(resources)
    objects = instances
    resources.keys.each do |name|
      current_resource = resources[name]
      provider = instances.find { |i| i.name == name }
Severity: Minor
Found in lib/puppet/provider/wls_authentication_provider/prefetching.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 wlst has a Cognitive Complexity of 14 (exceeds 5 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

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 rest has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def rest(action, domain, domain_values, parameters = {})
      case action
      when 'index' then

        all_items = []
Severity: Minor
Found in lib/utils/wls_access.rb - About 1 hr to fix

    Method managedserver_control has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def managedserver_control(action)
        Puppet.debug "managedserver action: #{action}"
    
        target                      = resource[:target]
        name                        = resource[:server_name]
    Severity: Minor
    Found in lib/puppet/provider/wls_managedserver/wls_managedserver.rb - About 1 hr to fix

      Method execute has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

        def execute
          domain     = resource[:domain]
          cwd        = resource[:cwd]
          statement  = resource[:statement]
          #
      Severity: Minor
      Found in lib/puppet/provider/wls_exec/wlst.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 managedserver_status has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def managedserver_status
          domain_name                 = resource[:domain_name]
          name                        = resource[:server_name]
          target                      = resource[:target]
          user                        = resource[:os_user]
      Severity: Minor
      Found in lib/puppet/provider/wls_managedserver/wls_managedserver.rb - About 1 hr to fix

        Method run has 12 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def self.run(user,
                       domain,
                       weblogicHomeDir,
                       weblogicUser,
                       weblogicPassword,
        Severity: Major
        Found in lib/utils/wls_daemon.rb - About 1 hr to fix

          Method initialize has 12 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            def initialize(user,
                           domain,
                           weblogicHomeDir,
                           weblogicUser,
                           weblogicPassword,
          Severity: Major
          Found in lib/utils/wls_daemon.rb - About 1 hr to fix

            Method bsu_patch has 36 lines of code (exceeds 25 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 1 hr to fix

              Method ohsserver_status has 36 lines of code (exceeds 25 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 1 hr to fix

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

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

                  def rcu(action)
                    Puppet.info "RCU #{action}"
                    user         = resource[:os_user]
                    statement    = resource[:statement]
                    jdk_home_dir = resource[:jdk_home_dir]
                Severity: Minor
                Found in lib/puppet/provider/wls_rcu/wls_rcu.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_status has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def domain_partition_control_status
                    name                = resource[:domain_partition]
                    user                = resource[:os_user]
                    middleware_home_dir = resource[:middleware_home_dir]
                    weblogic_user       = resource[:weblogic_user]

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

                    def unless_value?
                      domain = resource[:domain]
                      statement = resource[:unless]
                      cwd        = resource[:cwd]
                      #
                  Severity: Minor
                  Found in lib/puppet/type/wls_exec/statement.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 managedserver_control has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def managedserver_control(action)
                      Puppet.debug "managedserver action: #{action}"
                  
                      target                      = resource[:target]
                      name                        = resource[:server_name]
                  Severity: Minor
                  Found in lib/puppet/provider/wls_managedserver/wls_managedserver.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 opatch has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def opatch(command)
                      kernel = Facter.value(:kernel)
                      su_shell = kernel == 'Linux' ? '-s /bin/bash' : ''
                      oracle_product_home_dir = resource[:oracle_product_home_dir]
                      jre_specfied            = resource[:jdk_home_dir] ? " -jre #{resource[:jdk_home_dir]} " : ''
                  Severity: Minor
                  Found in lib/puppet/provider/wls_opatch/prefetching.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 rcu_status has 29 lines of code (exceeds 25 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 1 hr to fix

                    Method bsu_status has 29 lines of code (exceeds 25 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 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language