Method setup_single_compiler
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Wontfix
def setup_single_compiler(compiler, is_release)
compiler[:architecture] = setup_compiler_architecture(compiler)
compiler[:version] = setup_compiler_version(compiler)
compiler[:cc_bin], compiler[:cxx_bin] = setup_gcc_style_cc_and_cxx(compiler)
compiler[:analyze_only] = false
- 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_configuration
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def load_configuration(location, ref, is_release)
# first get a list of all decent_ci files found at the root of the repo, and raise if none were found
fileset = Set.new
@client.content(location, :path => '.', :ref => ref).each do |path|
fileset << path.name if path.name =~ /\.decent_ci.*/
- 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_configuration
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def load_configuration(location, ref, is_release)
# first get a list of all decent_ci files found at the root of the repo, and raise if none were found
fileset = Set.new
@client.content(location, :path => '.', :ref => ref).each do |path|
fileset << path.name if path.name =~ /\.decent_ci.*/
Method which
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def which(cmd, extra_paths = nil)
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
path_array = ENV['PATH'].split(File::PATH_SEPARATOR)
path_array.concat(extra_paths) unless extra_paths.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 load_yaml
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def load_yaml(name, this_location, this_ref)
return nil if this_location.nil? || name.nil?
begin
content = @client.content(this_location, :path => name, :ref => this_ref)
- 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 setup_gcc_style_cc_and_cxx
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Wontfix
def setup_gcc_style_cc_and_cxx(compiler)
return [compiler[:cc_bin], compiler[:cxx_bin]] unless compiler[:cc_bin].nil? || compiler[:cxx_bin].nil?
return [nil, nil] if compiler[:name].nil? || !%w[clang gcc].include?(compiler[:name])
- 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"