Showing 5 of 7 total issues
Method print_report
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def print_report(start_times, end_times, order)
def l(s)
logger.info s
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_backup_files
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_backup_files
gem_group(:backup) do
gem "whenever", :require => false
# Rails 3.2.12 and lower of the Rails 3.2 release series requires mail ~> 2.4.X which neccesitates an older version of backup
# We'll handle two cases: one for Rails 3.2.(0-12) and one for Rails 3.2.13 + Rails 4
Method add_optional_operational_gems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_optional_operational_gems
needs_bundle = false
unless options[:disable_newrelic]
say_status(:configure, "New Relic gem")
- 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_backup_files
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_backup_files
gem_group(:backup) do
gem "whenever", :require => false
# Rails 3.2.12 and lower of the Rails 3.2 release series requires mail ~> 2.4.X which neccesitates an older version of backup
# We'll handle two cases: one for Rails 3.2.(0-12) and one for Rails 3.2.13 + Rails 4
- 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 stream_output_from_command
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def stream_output_from_command(cmd, continuous = false)
trap("INT") { puts 'Output cancelled'; exit 0; }
Capistrano::CLI.ui.say("<%= color('Streaming output Ctrl+c to cancel', :blue) %>") if continuous
run(cmd) do |channel, stream, data|
- 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"