Showing 27 of 29 total issues
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 no_of_libraries
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def no_of_libraries topic
if !@no_of_libraries_cache.has_key?(topic)
count = 0
@libraries.each do |l|
topics = l.latest_manifest.topics
- 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 latest_libraries
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def latest_libraries
releases = Array.new
is_kde_added = false
libraries.select do |library|
- 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 attribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.attribute(name, &block)
define_method("#{name}=") do |value|
@values[name] = value
@valid[name] = true
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 more_urls?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def more_urls?
@manifest.urls.class.all_keys.each do |key, type|
if key != :homepage && key != :screenshots && key != :logo &&
key != :description_source
if @manifest.urls.send(key)
- 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 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"
Further reading
Method from_hash
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def from_hash(hash)
hash.each do |key, value|
next if key == "$schema"
type = self.class.all_keys[key.to_sym]
value = hash[key]
- 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"