lib/cf_deployer/stack.rb
Method deploy
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
def deploy
config_dir = @context[:config_dir]
template = CfDeployer::ConfigLoader.erb_to_json(@component, @context)
capabilities = @context[:capabilities] || []
notify = @context[:notify] || []
- 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 wait_for_stack_to_delete
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def wait_for_stack_to_delete
Timeout::timeout(900){
while exists?
begin
Log.info "current status: #{stack_status}"
- 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_stack
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_stack(template, params, capabilities, tags, notify, create_policy_json)
Method update_stack
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update_stack(template, params, capabilities, tags, override_policy_json)