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 = {})
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')
- Read upRead up
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
- Read upRead up
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
- Read upRead up
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
- Read upRead up
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]
- Read upRead up
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'
- Read upRead up
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"