Method product
has a Cognitive Complexity of 24 (exceeds 10 allowed). Consider refactoring. Wontfix
def product(*targets)
RMT::Lockfile.lock('mirror') do
start_time = Time.current
targets = clean_target_input(targets)
- 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 in_alpha_or_beta?
has a Cognitive Complexity of 22 (exceeds 10 allowed). Consider refactoring. Open
def in_alpha_or_beta?
products = []
unless errored_repos_id.empty?
products = Product.joins(:repositories).where(
'repositories.id' => errored_repos_id
- 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 mirror_repositories!
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
def mirror_repositories!(repos)
downloaded_files_count = 0
downloaded_files_size = 0
repos.compact.each do |repo|
- 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 product
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def product(*targets)
RMT::Lockfile.lock('mirror') do
start_time = Time.current
targets = clean_target_input(targets)