Showing 3 of 43 total issues
Method collect_cloudwatch_api_references!
has a Cognitive Complexity of 28 (exceeds 11 allowed). Consider refactoring. Open
def collect_cloudwatch_api_references!(target_collection, event_data, depth = 0)
# Check a reasonable depth, so this can't fail with max stack size
raise "Depth 20 reached when scanning EmsEvent for Targets" if depth > 20
# Cloud
- Read upRead up
- Create a ticketCreate a ticket
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 response_handler_loop
has a Cognitive Complexity of 21 (exceeds 11 allowed). Consider refactoring. Open
def response_handler_loop
@shutdown_instance_wait_thread = nil
@response_data_dir = response_data_dir
until @shutdown_instance_wait_thread
@coordinators_mutex.synchronize do
- Read upRead up
- Create a ticketCreate a ticket
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 perform_metadata_sync
has a Cognitive Complexity of 14 (exceeds 11 allowed). Consider refactoring. Open
def perform_metadata_sync(extract_reply)
ost = OpenStruct.new
ost.reply = extract_reply
ost.jobid = extract_reply[:job_id]
job = Job.find_by(:id => ost.jobid)
- Read upRead up
- Create a ticketCreate a ticket
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"