puppetlabs/facter-ng

View on GitHub

Showing 135 of 200 total issues

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

  module Linux
    module Memory
      module System
        class Available
          FACT_NAME = 'memory.system.available'
Severity: Major
Found in lib/facts/linux/memory/system/available.rb and 7 other locations - About 35 mins to fix
lib/facts/linux/memory/swap/available.rb on lines 4..14
lib/facts/linux/memory/swap/total.rb on lines 4..14
lib/facts/linux/memory/system/total.rb on lines 4..14
lib/facts/macosx/memory/swap/available.rb on lines 4..15
lib/facts/macosx/memory/swap/total.rb on lines 4..15
lib/facts/macosx/memory/system/available.rb on lines 4..15
lib/facts/macosx/memory/system/total.rb on lines 4..15

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 35.

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

          def collect_processors_info(fact_name)
            require "#{ROOT_DIR}/lib/resolvers/freebsd/ffi/ffi_helper"

            @fact_list[:logical_count] = logical_count
            @fact_list[:models] = Array.new(logical_count, model) if logical_count && model
Severity: Minor
Found in lib/resolvers/freebsd/processors.rb and 1 other location - About 35 mins to fix
lib/resolvers/bsd/processors.rb on lines 17..24

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 35.

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

  module Aix
    module Hypervisors
      class Lpar
        FACT_NAME = 'hypervisors.lpar'

Severity: Minor
Found in lib/facts/aix/hypervisors/lpar.rb and 1 other location - About 35 mins to fix
lib/facts/aix/hypervisors/wpar.rb on lines 4..14

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 35.

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 8 locations. Consider refactoring.
Open

  module Macosx
    module Memory
      module Swap
        class Total
          FACT_NAME = 'memory.swap.total'
Severity: Major
Found in lib/facts/macosx/memory/swap/total.rb and 7 other locations - About 35 mins to fix
lib/facts/linux/memory/swap/available.rb on lines 4..14
lib/facts/linux/memory/swap/total.rb on lines 4..14
lib/facts/linux/memory/system/available.rb on lines 4..15
lib/facts/linux/memory/system/total.rb on lines 4..14
lib/facts/macosx/memory/swap/available.rb on lines 4..15
lib/facts/macosx/memory/system/available.rb on lines 4..15
lib/facts/macosx/memory/system/total.rb on lines 4..15

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 35.

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 8 locations. Consider refactoring.
Open

  module Linux
    module Memory
      module Swap
        class Total
          FACT_NAME = 'memory.swap.total'
Severity: Major
Found in lib/facts/linux/memory/swap/total.rb and 7 other locations - About 35 mins to fix
lib/facts/linux/memory/swap/available.rb on lines 4..14
lib/facts/linux/memory/system/available.rb on lines 4..15
lib/facts/linux/memory/system/total.rb on lines 4..14
lib/facts/macosx/memory/swap/available.rb on lines 4..15
lib/facts/macosx/memory/swap/total.rb on lines 4..15
lib/facts/macosx/memory/system/available.rb on lines 4..15
lib/facts/macosx/memory/system/total.rb on lines 4..15

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 35.

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 8 locations. Consider refactoring.
Open

  module Linux
    module Memory
      module Swap
        class Available
          FACT_NAME = 'memory.swap.available'
Severity: Major
Found in lib/facts/linux/memory/swap/available.rb and 7 other locations - About 35 mins to fix
lib/facts/linux/memory/swap/total.rb on lines 4..14
lib/facts/linux/memory/system/available.rb on lines 4..15
lib/facts/linux/memory/system/total.rb on lines 4..14
lib/facts/macosx/memory/swap/available.rb on lines 4..15
lib/facts/macosx/memory/swap/total.rb on lines 4..15
lib/facts/macosx/memory/system/available.rb on lines 4..15
lib/facts/macosx/memory/system/total.rb on lines 4..15

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 35.

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

  module Linux
    class Sshalgorithmkey
      FACT_NAME = 'ssh.*key'
      TYPE = :legacy

Severity: Minor
Found in lib/facts/linux/sshalgorithmkey.rb and 1 other location - About 35 mins to fix
lib/facts/macosx/sshalgorithmkey.rb on lines 4..13

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 35.

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 8 locations. Consider refactoring.
Open

  module Linux
    module Memory
      module System
        class Total
          FACT_NAME = 'memory.system.total'
Severity: Major
Found in lib/facts/linux/memory/system/total.rb and 7 other locations - About 35 mins to fix
lib/facts/linux/memory/swap/available.rb on lines 4..14
lib/facts/linux/memory/swap/total.rb on lines 4..14
lib/facts/linux/memory/system/available.rb on lines 4..15
lib/facts/macosx/memory/swap/available.rb on lines 4..15
lib/facts/macosx/memory/swap/total.rb on lines 4..15
lib/facts/macosx/memory/system/available.rb on lines 4..15
lib/facts/macosx/memory/system/total.rb on lines 4..15

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 35.

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 8 locations. Consider refactoring.
Open

  module Macosx
    module Memory
      module Swap
        class Available
          FACT_NAME = 'memory.swap.available'
Severity: Major
Found in lib/facts/macosx/memory/swap/available.rb and 7 other locations - About 35 mins to fix
lib/facts/linux/memory/swap/available.rb on lines 4..14
lib/facts/linux/memory/swap/total.rb on lines 4..14
lib/facts/linux/memory/system/available.rb on lines 4..15
lib/facts/linux/memory/system/total.rb on lines 4..14
lib/facts/macosx/memory/swap/total.rb on lines 4..15
lib/facts/macosx/memory/system/available.rb on lines 4..15
lib/facts/macosx/memory/system/total.rb on lines 4..15

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 35.

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 8 locations. Consider refactoring.
Open

  module Macosx
    module Memory
      module System
        class Available
          FACT_NAME = 'memory.system.available'
Severity: Major
Found in lib/facts/macosx/memory/system/available.rb and 7 other locations - About 35 mins to fix
lib/facts/linux/memory/swap/available.rb on lines 4..14
lib/facts/linux/memory/swap/total.rb on lines 4..14
lib/facts/linux/memory/system/available.rb on lines 4..15
lib/facts/linux/memory/system/total.rb on lines 4..14
lib/facts/macosx/memory/swap/available.rb on lines 4..15
lib/facts/macosx/memory/swap/total.rb on lines 4..15
lib/facts/macosx/memory/system/total.rb on lines 4..15

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 35.

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 8 locations. Consider refactoring.
Open

  module Macosx
    module Memory
      module System
        class Total
          FACT_NAME = 'memory.system.total'
Severity: Major
Found in lib/facts/macosx/memory/system/total.rb and 7 other locations - About 35 mins to fix
lib/facts/linux/memory/swap/available.rb on lines 4..14
lib/facts/linux/memory/swap/total.rb on lines 4..14
lib/facts/linux/memory/system/available.rb on lines 4..15
lib/facts/linux/memory/system/total.rb on lines 4..14
lib/facts/macosx/memory/swap/available.rb on lines 4..15
lib/facts/macosx/memory/swap/total.rb on lines 4..15
lib/facts/macosx/memory/system/available.rb on lines 4..15

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 35.

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

          def collect_processors_info(fact_name)
            require "#{ROOT_DIR}/lib/resolvers/bsd/ffi/ffi_helper"

            @fact_list[:logical_count] = logical_count
            @fact_list[:models] = Array.new(logical_count, model) if logical_count && model
Severity: Minor
Found in lib/resolvers/bsd/processors.rb and 1 other location - About 35 mins to fix
lib/resolvers/freebsd/processors.rb on lines 19..26

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 35.

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

  module Aix
    module Hypervisors
      class Wpar
        FACT_NAME = 'hypervisors.wpar'

Severity: Minor
Found in lib/facts/aix/hypervisors/wpar.rb and 1 other location - About 35 mins to fix
lib/facts/aix/hypervisors/lpar.rb on lines 4..15

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 35.

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

  module Macosx
    class Sshalgorithmkey
      FACT_NAME = 'ssh.*key'
      TYPE = :legacy

Severity: Minor
Found in lib/facts/macosx/sshalgorithmkey.rb and 1 other location - About 35 mins to fix
lib/facts/linux/sshalgorithmkey.rb on lines 4..13

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 35.

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

  module Windows
    module Memory
      module System
        class Total
          FACT_NAME = 'memory.system.total'
Severity: Minor
Found in lib/facts/windows/memory/system/total.rb and 1 other location - About 35 mins to fix
lib/facts/windows/memory/system/available.rb on lines 4..15

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 34.

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

  module Windows
    module Memory
      module System
        class Available
          FACT_NAME = 'memory.system.available'
Severity: Minor
Found in lib/facts/windows/memory/system/available.rb and 1 other location - About 35 mins to fix
lib/facts/windows/memory/system/total.rb on lines 4..15

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 34.

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

  module Windows
    module Hypervisors
      class Hyperv
        FACT_NAME = 'hypervisors.hyperv'

Severity: Minor
Found in lib/facts/windows/hypervisors/hyperv.rb and 1 other location - About 35 mins to fix
lib/facts/windows/hypervisors/vmware.rb on lines 4..20

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 34.

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

  module Windows
    module Hypervisors
      class Vmware
        FACT_NAME = 'hypervisors.vmware'

Severity: Minor
Found in lib/facts/windows/hypervisors/vmware.rb and 1 other location - About 35 mins to fix
lib/facts/windows/hypervisors/hyperv.rb on lines 4..20

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 34.

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

          def read_disks
            @fact_list[:disks] = {}

            each_geom_class_provider('DISK') do |provider|
              name = provider.get_text('./name').value
Severity: Minor
Found in lib/resolvers/freebsd/geom_resolver.rb and 1 other location - About 30 mins to fix
lib/resolvers/freebsd/geom_resolver.rb on lines 39..47

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 33.

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 8 locations. Consider refactoring.
Open

  module Macosx
    module Memory
      module Swap
        class TotalBytes
          FACT_NAME = 'memory.swap.total_bytes'
Severity: Major
Found in lib/facts/macosx/memory/swap/total_bytes.rb and 7 other locations - About 30 mins to fix
lib/facts/linux/memory/swap/available_bytes.rb on lines 4..15
lib/facts/linux/memory/swap/total_bytes.rb on lines 4..14
lib/facts/linux/memory/system/available_bytes.rb on lines 4..15
lib/facts/linux/memory/system/total_bytes.rb on lines 4..14
lib/facts/macosx/memory/swap/available_bytes.rb on lines 4..14
lib/facts/macosx/memory/system/available_bytes.rb on lines 4..14
lib/facts/macosx/memory/system/total_bytes.rb on lines 4..14

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 33.

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

Severity
Category
Status
Source
Language