Method logs
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def logs(id)
puts "`jobs logs #{id}` called with options: #{options}" if Holistics.debug?
if options[:follow]
last_id = 0
loop do
- 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 info
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def info(id)
puts "`jobs info #{id}` called with options: #{options}" if Holistics.debug?
item = @this.find(id)
{
id: item['id'].to_s.yellow,
- 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 cancel
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cancel(id)
puts "`jobs cancel #{id}` called with options: #{options}" if Holistics.debug?
print "Cancelling Job #{id} ...".yellow
result = @this.cancel(id)
if result['status'].to_s.upcase == 'OK'
- 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 list
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def list
puts "`jobs list` called with options: #{options}" if Holistics.debug?
tp(
@this.all(options).map do |item|
{
- 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"