Showing 93 of 93 total issues
Method delete_service
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def delete_service
if input[:all]
return unless input[:really, "ALL SERVICES", :bad]
client.service_instances.each do |i|
- 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 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def login
show_context
credentials =
{ :username => input[:username],
Method delete
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def delete
apps = client.apps
if input[:all]
return unless input[:really, "ALL APPS", :bad]
- 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 services
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def services
msg =
if space = input[:space]
"Getting services in #{c(space.name, :name)}"
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 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def space
org = input[:organization]
space = input[:space, org]
unless space
Method display_app
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def display_app(a)
status = app_status(a)
line "#{c(a.name, :name)}: #{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 app_matches?
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def app_matches?(a, options)
if name = options[:name]
return false if a.name !~ /#{name}/
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 tail
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def tail
app = input[:app]
lines = Queue.new
max_len = 0
Method apps
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def apps
if space = input[:space]
begin
space.summarize!
rescue CFoundry::APIError
Method stats
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stats
app = input[:app]
stats =
with_progress("Getting stats for #{c(app.name, :name)}") do |s|
Method load_all
has 32 lines of code (exceeds 25 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|
Method select_space
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def select_space(input, info, changed_org)
if input.has?(:space) || !space_valid?(info[:space])
line if changed_org && !quiet?
space = input[:space, client.current_organization]
if 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 handler
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def handler(event, state)
ans = state.answer
pos = state.position
exit if event == :eof
- 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 target
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def target
unless input.has?(:url) || input.has?(:organization) || \
input.has?(:space)
display_target
display_org_and_space unless 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 space
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def space
org = input[:organization]
space = input[:space, org]
unless 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 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|
- 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 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 client
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def client(target = client_target)
return @@client if defined?(@@client) && @@client
return unless target
info = target_info(target)
Method unmap
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def unmap
return invoke :v1_unmap, input.inputs, input.given unless v2?
if input[:all]
if input.has?(:app)