biemond/biemond-orawls

View on GitHub

Showing 67 of 131 total issues

Method wlst2 has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def wlst2(content, action, domain, domain_values, parameters = {})
Severity: Minor
Found in lib/utils/wls_access.rb - About 35 mins to fix

    Method get_orainst_products has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def get_orainst_products(path)
      # puts "get_orainst_products with path: "+path
      unless path.nil?
        if FileTest.exists?(path + '/ContentsXML/inventory.xml')
          file = File.read(path + '/ContentsXML/inventory.xml')
    Severity: Minor
    Found in lib/facter/orawls.rb - About 35 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 insync? has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

      def insync?(to)
        if resource[:refreshonly] != :true
          resource[:unless] ? unless_value? : false
        else
          true
    Severity: Minor
    Found in lib/puppet/type/wls_exec/statement.rb - About 35 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 change_to_s has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

      def change_to_s(current, should)
        message = ''
        unless ((current - should).inspect) == '[]'
          message << "removing #{(current-should).inspect} "
        end
    Severity: Minor
    Found in lib/puppet/type/wls_group/users.rb - About 25 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 change_to_s has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

      def change_to_s(current, desire)
        message = ''
        unless ((current-desire).inspect) == '[]'
          message << "removing #{(current-desire).inspect} "
        end
    Severity: Minor
    Found in lib/puppet/type/wls_server/arguments.rb - About 25 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 unzip has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        def unzip(file)
          output = "#{tmp_dir}/wls_opatch"
          Puppet.info "Unzipping source #{source} to #{output}"
          environment = {}
          environment[:PATH] = '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'
    Severity: Minor
    Found in lib/puppet/type/wls_opatch.rb - About 25 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 configure has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

      def configure
        name            = resource[:name]
        oracle_base     = resource[:oracle_base_dir]
        ora_inventory   = resource[:ora_inventory_dir]
        download_folder = resource[:download_dir]
    Severity: Minor
    Found in lib/puppet/provider/wls_directory_structure/wls_directory_structure.rb - About 25 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

    Severity
    Category
    Status
    Source
    Language