Showing 14 of 19 total issues
Method run
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
def run
services = parse_list(config[:service_list])
failed_services = []
s = client.get_services
# TODO: come back and clean me up
- 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 run
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
def run
pods_list = []
failed_pods = []
pods = []
if config[:pod_filter].nil?
- 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 run
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def run
pods_list = []
failed_pods = []
pods = []
if config[:pod_filter].nil?
- 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 run
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def run
pods_list = []
restarted_pods = []
pods = []
if config[:pod_filter].nil?
- 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 kubeclient
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def kubeclient(options = {})
raise(ArgumentError, 'options must be a hash') unless options.is_a?(Hash)
if options[:kube_config]
begin
- 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 run
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def run
pods_list = []
pods = []
warn = false
crit = false
- 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 kubeclient
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
def kubeclient(options = {})
raise(ArgumentError, 'options must be a hash') unless options.is_a?(Hash)
if options[:kube_config]
begin
Method run
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def run
failed_nodes = []
client.get_nodes.each do |node|
item = node.status.conditions.detect { |condition| condition.type == 'Ready' }
if item.nil?
- 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 run
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
services = parse_list(config[:service_list])
failed_services = []
s = client.get_services
# TODO: come back and clean me up
Method run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
pods_list = []
pods = []
warn = false
crit = false
Method run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
pods_list = []
failed_pods = []
pods = []
if config[:pod_filter].nil?
Method run
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
pods_list = []
failed_pods = []
pods = []
if config[:pod_filter].nil?
Method run
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
pods_list = []
restarted_pods = []
pods = []
if config[:pod_filter].nil?
Method ready?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ready?(pod)
failed = true
pod.status.conditions.each do |c|
if c.type == 'Ready'
failed = false if c.status == 'True'
- 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"