Method evaluate_settings
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def evaluate_settings(settings_data = @settings)
settings_data.each do |key, value|
next if value.is_a?(FalseClass)
value = {} if value.is_a?(TrueClass)
Method evaluate_for_wraith
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def evaluate_for_wraith(value)
@settings[:wraith] = {}
if value.include?('browser')
value['browser'].each do |browser, browser_value|
Method evaluate_for_wraith
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def evaluate_for_wraith(value)
@settings[:wraith] = {}
if value.include?('browser')
value['browser'].each do |browser, browser_value|
- 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 initialize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def initialize(opts = {})
# Strips from command line
opts = opts.delete_if { |k, v| v.nil? }
- 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 evaluate_settings
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def evaluate_settings(settings_data = @settings)
settings_data.each do |key, value|
next if value.is_a?(FalseClass)
value = {} if value.is_a?(TrueClass)
- 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 load_config
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_config(value)
return value unless value.is_a?(String)
if value =~ /^http/
begin open(value)
- 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 load_config_file
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def load_config_file(file_path, root)
conf_location = if file_path.present? && File.exist?(file_path)
file_path
else
- 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"