Showing 12 of 12 total issues
Class GithubRelease
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class GithubRelease # rubocop:disable Metrics/ClassLength
extend Forwardable
include Moonshot::ResourcesHelper
include Moonshot::DoctorHelper
include Moonshot::Shell
Method run!
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run! # rubocop:disable Metrics/MethodLength
# Commands defined as Moonshot::Commands require a properly
# configured Moonshot.rb and supporting files. Without them, we only
# support `--help` and `new`.
return if handle_early_commands
Method run!
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def run! # rubocop:disable Metrics/MethodLength
# Commands defined as Moonshot::Commands require a properly
# configured Moonshot.rb and supporting files. Without them, we only
# support `--help` and `new`.
return if handle_early_commands
- 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 choose!
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def choose!
groups = @stack.resources_of_type('AWS::AutoScaling::AutoScalingGroup')
asg = if groups.count == 1
groups.first
- 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 pre_create
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def pre_create(res)
@ilog = res.ilog
key_arn = find_or_create_kms_key
pe = ParameterEncrypter.new(key_arn)
- 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 find_or_create_kms_key
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def find_or_create_kms_key
key_arn = nil
@ilog.start_threaded "Checking for KMS Key #{@kms_key_parameter_name}" do |s|
if Moonshot.config.parameters.key?(@kms_key_parameter_name)
- 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 tar
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def tar(target_files)
tar_stream = StringIO.new
Gem::Package::TarWriter.new(tar_stream) do |writer|
# adding user files
unless target_files.nil? || target_files.empty?
- 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_job
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def wait_for_job(job_number)
authenticate
# Wait for the job to complete or hit the timeout.
start = Time.new
- 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_all_checks
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def run_all_checks
success = true
puts
puts self.class.name.split('::').last
private_methods.each do |meth|
- 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 display_changes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def display_changes
wait_for_change_set unless @change_set
@change_set.changes.map(&:resource_change).each do |c|
puts "* #{c.action} #{c.logical_resource_id} (#{c.resource_type})"
- 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 get
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get(sp)
return unless Moonshot.config.interactive
@sp = sp
- 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 confirm?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def confirm?
raise 'Cannot confirm ChangeSet when interactive mode is disabled!' unless Moonshot.config.interactive
loop do
print 'Apply changes? '
- 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"