HewlettPackard/oneview-puppet

View on GitHub

Showing 92 of 92 total issues

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  desc "Oneview's Logical Switch"

  #:nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_logical_switch.rb and 4 other locations - About 1 hr to fix
lib/puppet/type/oneview_ethernet_network.rb on lines 18..49
lib/puppet/type/oneview_server_profile_template.rb on lines 18..51
lib/puppet/type/oneview_storage_system.rb on lines 18..51
lib/puppet/type/oneview_volume_template.rb on lines 18..53

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  desc "Oneview's Server Profile Template"

  #:nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_server_profile_template.rb and 4 other locations - About 1 hr to fix
lib/puppet/type/oneview_ethernet_network.rb on lines 18..49
lib/puppet/type/oneview_logical_switch.rb on lines 18..50
lib/puppet/type/oneview_storage_system.rb on lines 18..51
lib/puppet/type/oneview_volume_template.rb on lines 18..53

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  desc "Oneview's Ethernet Network"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_ethernet_network.rb and 4 other locations - About 1 hr to fix
lib/puppet/type/oneview_logical_switch.rb on lines 18..50
lib/puppet/type/oneview_server_profile_template.rb on lines 18..51
lib/puppet/type/oneview_storage_system.rb on lines 18..51
lib/puppet/type/oneview_volume_template.rb on lines 18..53

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  desc "Oneview's Storage System"

  ensurable do
    defaultvalues

Severity: Major
Found in lib/puppet/type/oneview_storage_system.rb and 4 other locations - About 1 hr to fix
lib/puppet/type/oneview_ethernet_network.rb on lines 18..49
lib/puppet/type/oneview_logical_switch.rb on lines 18..50
lib/puppet/type/oneview_server_profile_template.rb on lines 18..51
lib/puppet/type/oneview_volume_template.rb on lines 18..53

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method get_without_ethernet has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  def get_without_ethernet
    Puppet.notice("\n\nLogical Downlink Without Ethernet\n")
    if @data.empty?
      list = @resource_type.get_without_ethernet(@client)
      raise('There is no Logical Downlink without ethernet in the Oneview appliance.') if list.empty?
Severity: Minor
Found in lib/puppet/provider/oneview_logical_downlink/c7000.rb - About 1 hr to fix

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 load_resource has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

def load_resource(type, id, ret_attribute: nil, base_module: OneviewSDK)
  raise(ArgumentError, 'Must specify a resource type') unless type
  return unless id
  klass = base_module.resource_named(type, api_version, resource_variant)
  data = id.is_a?(Hash) ? id : { name: id }
Severity: Minor
Found in lib/puppet/provider/common.rb - About 1 hr to fix

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_without_ethernet has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  def get_without_ethernet
    Puppet.notice("\n\nNetwork Set Without Ethernet\n")
    if @data.empty?
      list = @resource_type.get_without_ethernet(@client)
      raise('There is no Network Set without ethernet in the Oneview appliance.') if list.empty?
Severity: Minor
Found in lib/puppet/provider/oneview_network_set/c7000.rb - About 1 hr to fix

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

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  desc "Image Streamer's Deployment Plan"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/image_streamer_deployment_plan.rb and 3 other locations - About 1 hr to fix
lib/puppet/type/image_streamer_golden_image.rb on lines 18..46
lib/puppet/type/image_streamer_plan_script.rb on lines 18..46
lib/puppet/type/oneview_sas_interconnect.rb on lines 18..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  desc "Image Streamer's Golden Image"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/image_streamer_golden_image.rb and 3 other locations - About 1 hr to fix
lib/puppet/type/image_streamer_deployment_plan.rb on lines 18..46
lib/puppet/type/image_streamer_plan_script.rb on lines 18..46
lib/puppet/type/oneview_sas_interconnect.rb on lines 18..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  desc "Image Streamer's Plan Script"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/image_streamer_plan_script.rb and 3 other locations - About 1 hr to fix
lib/puppet/type/image_streamer_deployment_plan.rb on lines 18..46
lib/puppet/type/image_streamer_golden_image.rb on lines 18..46
lib/puppet/type/oneview_sas_interconnect.rb on lines 18..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  desc "Oneview's SAS Interconnect"

  # :nocov:
  ensurable do
    defaultvalues
Severity: Major
Found in lib/puppet/type/oneview_sas_interconnect.rb and 3 other locations - About 1 hr to fix
lib/puppet/type/image_streamer_deployment_plan.rb on lines 18..46
lib/puppet/type/image_streamer_golden_image.rb on lines 18..46
lib/puppet/type/image_streamer_plan_script.rb on lines 18..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 49.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  desc "Image Streamer's OS Volume"

  # :nocov:
  ensurable do
    newvalue(:found) do
Severity: Major
Found in lib/puppet/type/image_streamer_os_volume.rb and 1 other location - About 1 hr to fix
lib/puppet/type/oneview_connection_template.rb on lines 18..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  desc "Oneview's Connection Template"

  # :nocov:
  ensurable do
    newvalue(:present) do
Severity: Major
Found in lib/puppet/type/oneview_connection_template.rb and 1 other location - About 1 hr to fix
lib/puppet/type/image_streamer_os_volume.rb on lines 18..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Consider simplifying this complex logical expression.
Open

    next if value.to_s[0..6].include?('/rest/') || !(key.to_s.include?('Uri') || key.to_s == 'uri' || key.to_s.end_with?('URI')) ||
            value.nil? || %w(null nil).include?(value.to_s) || exception_to_be_treated_within_provider(key)
Severity: Major
Found in lib/puppet/provider/uri_parsing.rb - About 1 hr to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      desc "Oneview's Enclosure Group"
    
      # :nocov:
      ensurable do
        defaultvalues
    Severity: Major
    Found in lib/puppet/type/oneview_enclosure_group.rb and 2 other locations - About 55 mins to fix
    lib/puppet/type/oneview_logical_interconnect_group.rb on lines 18..46
    lib/puppet/type/oneview_storage_pool.rb on lines 18..46

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 46.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      desc "Oneview's Logical Interconnect Group"
    
      #:nocov:
      ensurable do
        defaultvalues
    Severity: Major
    Found in lib/puppet/type/oneview_logical_interconnect_group.rb and 2 other locations - About 55 mins to fix
    lib/puppet/type/oneview_enclosure_group.rb on lines 18..45
    lib/puppet/type/oneview_storage_pool.rb on lines 18..46

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 46.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      desc "Oneview's Storage Pool"
    
      ensurable do
        defaultvalues
    
    
    Severity: Major
    Found in lib/puppet/type/oneview_storage_pool.rb and 2 other locations - About 55 mins to fix
    lib/puppet/type/oneview_enclosure_group.rb on lines 18..45
    lib/puppet/type/oneview_logical_interconnect_group.rb on lines 18..46

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 46.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Method hash_merge has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

      def hash_merge(base_hash, new_hash)
        base_hash.each_key do |key|
          # checks if the value is present in the new hash
          next unless new_hash[key]
          if base_hash[key].is_a?(Hash)
    Severity: Minor
    Found in lib/puppet/provider/oneview_logical_interconnect/c7000.rb - About 55 mins to fix

    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 parse_uris_for_firmware_driver has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

      def parse_uris_for_firmware_driver(key, value, extra = nil)
        if value.is_a? Array
          value.each_with_index do |array_value, array_key|
            parse_uris_for_firmware_driver(key, array_value, array_key)
          end
    Severity: Minor
    Found in lib/puppet/provider/oneview_firmware_driver/c7000.rb - About 55 mins to fix

    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 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

      def create
        current_resource = @resource_type.find_by(@client, unique_id).first
        if current_resource
          return true unless @data['new_name']
          current_resource.update_name(@data['new_name'])
    Severity: Minor
    Found in lib/puppet/provider/image_streamer_artifact_bundle/image_streamer.rb - About 55 mins to fix

    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

    Severity
    Category
    Status
    Source
    Language