Showing 22 of 42 total issues
Class GitPush
has 41 methods (exceeds 20 allowed). Consider refactoring. Open
class GitPush < Provider
register :git_push
status :dev
Class Git
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class Git < Pages
register :'pages:git'
status :stable
Class Cloudformation
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class Cloudformation < Provider
register :cloudformation
status :stable
full_name 'AWS CloudFormation'
File bintray.rb
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'net/http'
require 'uri'
require 'find'
module Dpl
Method walk
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def walk(key, *nodes)
case key
when :program
nodes[0].map { |node| walk(*node) }.compact
when :module
- 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 shell
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def shell(cmd, opts = {})
cmd = Cmd.new(nil, cmd, opts) if cmd.is_a?(String)
info cmd.msg if cmd.msg?
info cmd.echo if cmd.echo?
- 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 walk
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def walk(key, *nodes)
case key
when :program
nodes[0].map { |node| walk(*node) }.compact
when :module
Method run
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def run
stages = stage.select { |stage| run_stage?(stage) }
stages.each { |stage| run_stage(stage) }
run_cmds
rescue Error
- 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 lookup
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def lookup(key)
if vars? && !var?(key)
UNKNOWN % key
elsif mod = modifier(key)
key = key.to_s.sub("#{mod}d_", '')
- 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
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def find(path, includes, excludes, uploads, params, download)
Method check_deployment
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def check_deployment(msgs)
sleep 5
events.each do |event|
msg = "#{event.event_date} [#{event.severity}] #{event.message}"
error "Deployment failed: #{msg}" if event.severity == 'ERROR'
- 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 deploy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def deploy
create_package unless package_exists?
create_version unless version_exists?
upload_files
sign_version if sign_version?
- 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_change_set
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_change_set(type)
info :create_change_set
set = client.create_change_set(common_params.merge(change_set_params(type)))
wait_for(:change_set_create_complete, change_set_name: set.id) if wait? && !test?
info :done
- 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 update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update
promote? ? promote : create_change_set(:update)
rescue Aws::CloudFormation::Errors::ValidationError => e
raise e unless e.message.start_with?('No updates are to be performed')
info :stack_up_to_date
- 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 login_token
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def login_token
return unless github?
info :login, user.login
error :insufficient_scopes unless sufficient_scopes?
rescue Octokit::Unauthorized => e
- 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 memoize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def memoize(name)
ivar = :"@#{name.to_s.sub('?', '_predicate')}"
prepend Module.new {
define_method(name) do |*args|
raise ArgsError.new('cannot pass arguments to memoized method %p' % name) unless args.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 config
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def config(*paths)
if paths.any?
@config_files = paths
elsif config_files
paths = config_files.dup
- 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 value_for
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def value_for(opt)
return if opt.type == :flag
return 1 if opt.type == :integer
return opt.enum.first if opt.enum?
str = opt.strs.detect { |str| str =~ /^--#{opt.name} (.*)$/ } && $1
- 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 deploy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def deploy
info :deploy
api.request_page_build slug
- 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 deploy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def deploy
stack_exists? ? update : create
store_events if output_file?
rescue Aws::CloudFormation::Errors::InvalidAccessKeyId
error :invalid_creds
- 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"