Showing 93 of 93 total issues
Method info
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def info
all = input[:all]
if all || input[:runtimes]
runtimes =
- 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 service_matches
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def service_matches(i, options)
if app = options[:app]
return false unless app.services.include? i
end
- 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
Class CLI
has 41 methods (exceeds 20 allowed). Consider refactoring. Open
class CLI < Mothership
include VMC::Interactive
include VMC::Spacing
option :help, :desc => "Show command usage", :alias => "-h",
File cli.rb
has 370 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yaml"
require "socket"
require "net/http"
require "multi_json"
require "fileutils"
Method tabular
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def tabular(*rows)
spacings = []
rows.each do |row|
next unless row
- 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 info
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
def info
all = input[:all]
if all || input[:runtimes]
runtimes =
Method unmap
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def unmap
return invoke :v1_unmap, input.inputs, input.given unless v2?
if input[:all]
if input.has?(:app)
- 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 map_route
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def map_route(app)
line unless quiet?
host = input[:host, app.name] if v2?
domain = input[:domain, app]
- 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 client
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def client(target = client_target)
return @@client if defined?(@@client) && @@client
return unless target
info = target_info(target)
- 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
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def login
show_context
credentials =
{ :username => input[:username],
- 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 tail
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def tail
app = input[:app]
lines = Queue.new
max_len = 0
- 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 scale
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def scale
app = input[:app]
if input.has?(:instances)
instances = input[:instances, app.total_instances]
- 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 delete_org
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def delete_org
org = input[:organization]
return unless input[:really, org]
spaces = org.spaces
- 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_inputs
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def get_inputs
inputs = {}
inputs[:name] = input[:name]
inputs[:total_instances] = input[:instances]
inputs[:space] = client.current_space if client.current_space
- 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_service
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_service
offerings = client.services
if input[:provider]
offerings.reject! { |s| s.provider != input[:provider] }
Method services
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
def services
msg =
if space = input[:space]
"Getting services in #{c(space.name, :name)}"
else
Method load_all
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def self.load_all
# auto-load gems with 'vmc-plugin' in their name
matching =
if Gem::Specification.respond_to? :find_all
Gem::Specification.find_all do |s|
- 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 delete_space
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def delete_space
org = input[:organization]
spaces = input[:spaces, org]
deleted_current = false
- 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_service
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def create_service
offerings = client.services
if input[:provider]
offerings.reject! { |s| s.provider != input[:provider] }
- 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 map_domain
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def map_domain
domain = client.domain_by_name(input[:name])
given_org = input.has?(:organization)
given_space = input.has?(:space)
- 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"