Method process_all_rpms
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def process_all_rpms
if !File.exist? @settings.cache_dir + "/qt_source.json"
create_qt_source_cache
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 create_manifest
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_manifest name, rpm_name
qf = 'version:%{VERSION}\n'
qf += 'summary:%{SUMMARY}\n'
qf += 'homepage:%{URL}\n'
qf += 'license:%{LICENSE}\n'
Method create_qt_source_cache
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def create_qt_source_cache
puts "Creating cache of Qt library RPMs"
sources = read_source_cache
- 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 process_all_rpms
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
def process_all_rpms
if !File.exist? @settings.cache_dir + "/qt_source.json"
create_qt_source_cache
end
Method create_manifest
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create_manifest name, rpm_name
qf = 'version:%{VERSION}\n'
qf += 'summary:%{SUMMARY}\n'
qf += 'homepage:%{URL}\n'
qf += 'license:%{LICENSE}\n'
- 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 create_qt_source_cache
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_qt_source_cache
puts "Creating cache of Qt library RPMs"
sources = read_source_cache
Method cut_off_number_suffix
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cut_off_number_suffix name
if @cut_off_exceptions.include? name
return name
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"