redbubble/kumo_keisei_gem

View on GitHub

Showing 3 of 9 total issues

Class Stack has 26 methods (exceeds 20 allowed). Consider refactoring.
Open

  class Stack
    class CreateError < StandardError; end
    class UpdateError < StandardError; end
    class UsageError < StandardError; end

Severity: Minor
Found in lib/kumo_keisei/stack.rb - About 3 hrs to fix

    Method wait_until_ready has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def wait_until_ready(raise_on_error=true)
          loop do
            stack = get_stack(dump_cache: true)
    
            if stack_ready?(stack.stack_status)
    Severity: Minor
    Found in lib/kumo_keisei/stack.rb - About 1 hr to fix

    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 wait_until_ready has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def wait_until_ready(raise_on_error=true)
          loop do
            stack = get_stack(dump_cache: true)
    
            if stack_ready?(stack.stack_status)
    Severity: Minor
    Found in lib/kumo_keisei/cloud_formation_stack.rb - About 1 hr to fix

    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

    Severity
    Category
    Status
    Source
    Language