lib/vagrant-vcloud/command.rb
Method command_vcloud_network
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def command_vcloud_network(cfg, vapp_id, ssh_host)
# FIXME: this needs to be fixed to accomodate the bridged scenario
# potentially showing only the assigned IPs in the VMs
puts 'Fetching vCloud Director network settings ...'
- Create a ticketCreate a ticket
Method command_vcloud_network
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
def command_vcloud_network(cfg, vapp_id, ssh_host)
# FIXME: this needs to be fixed to accomodate the bridged scenario
# potentially showing only the assigned IPs in the VMs
puts 'Fetching vCloud Director network settings ...'
- Read upRead up
- Create a ticketCreate a ticket
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 execute
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def execute
options = {}
opts = OptionParser.new do |o|
o.banner = 'Usage: vagrant vcloud [options]'
- Create a ticketCreate a ticket
Method execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def execute
options = {}
opts = OptionParser.new do |o|
o.banner = 'Usage: vagrant vcloud [options]'
- Read upRead up
- Create a ticketCreate a ticket
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"