Showing 102 of 102 total issues
Method apps_in_manifest
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def apps_in_manifest(input = nil, use_name = true, &blk)
names_or_paths =
if input.has?(:apps)
# names may be given but be [], which will still cause
# interaction, so use #direct instead of #[] here
Method apps
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def apps
if space = input[:space]
begin
space.summarize!
rescue CFoundry::APIError
- 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 start
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def start
apps = input[:all] ? client.apps : input[:apps]
fail "No applications given." if apps.empty?
spaced(apps) do |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 get_object
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def get_object
previous_object = client.send(type, (info[type])) if info[type]
if input.has?(type)
if respond_to?(:finder_argument, true)
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
def map_route(app)
line unless quiet?
host = input[:host, app.name]
finalize
- 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_manifest_for
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create_manifest_for(app, path)
meta = {
"name" => app.name,
"memory" => human_size(app.memory * 1024 * 1024, 0),
"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 stats
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def stats
app = input[:app]
stats =
with_progress("Getting stats for #{c(app.name, :name)}") do |s|
begin
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
def delete_org
org = input[:organization]
return unless input[:really, org]
is_current = org == client.current_organization
- 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_connection_info
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def get_connection_info(token)
response = nil
10.times do
begin
response =
- 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 unmap
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def unmap
if input[:all]
if input.has?(:app)
app = target = input[:app]
else
- 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 space
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def space
space = CF::Populators::Space.new(input, org).populate_and_save!
unless space
return if quiet?
- 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 tunnel
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def tunnel
instances = client.service_instances
fail "No services available for tunneling." if instances.empty?
instance = input[:instance, instances.sort_by(&:name)]
Method log_error
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def log_error(e)
ensure_config_dir
msg = e.class.name
msg << ": #{e}" unless e.to_s.empty?
Method curl
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def curl
mode = input[:mode].upcase
path = input[:path]
body = input[:body]
Method bind_services
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def bind_services(app)
return unless input[:bind_services]
while true
invoke :bind_service, :app => 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 tunnel
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def tunnel
instances = client.service_instances
fail "No services available for tunneling." if instances.empty?
instance = input[:instance, instances.sort_by(&: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 delete_space
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def delete_space
space = input[:space, org]
return unless input[:really, 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 login
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def login(auth = get_credentials)
if !auth["username"] || !auth["password"]
raise "Unable to verify console credentials."
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
Method log_error
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def log_error(e)
ensure_config_dir
msg = e.class.name
msg << ": #{e}" unless e.to_s.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 create_space
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def create_space
space = client.space
space.organization = org
space.name = input[: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"