jacoblearned/kitchen-pulumi

View on GitHub

Showing 14 of 17 total issues

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

module Kitchen
  module Pulumi
    module ConfigAttribute
      # Attribute used to specify the config_file containing a project's
      # stack configuration
Severity: Major
Found in lib/kitchen/pulumi/config_attribute/config_file.rb and 4 other locations - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/backend.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/directory.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/secrets_provider.rb on lines 8..28
lib/kitchen/pulumi/config_attribute/test_stack_name.rb on lines 8..29

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

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

module Kitchen
  module Pulumi
    module ConfigAttribute
      # Module used for specifying any required plugins that a project
      # will need to provision its resources.
Severity: Minor
Found in lib/kitchen/pulumi/config_attribute/plugins.rb and 2 other locations - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/stack_evolution.rb on lines 8..32
lib/kitchen/pulumi/config_attribute/systems.rb on lines 6..28

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

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 Kitchen
  module Pulumi
    module ConfigAttribute
      # Module used for the 'config' instance var on an
      # instance driver. The driver will set the Pulumi stack
Severity: Minor
Found in lib/kitchen/pulumi/config_attribute/config.rb and 1 other location - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/secrets.rb on lines 8..30

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

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

module Kitchen
  module Pulumi
    module ConfigAttribute
      # Attribute used to specify the directory containing a project's
      # Pulumi.yaml file
Severity: Major
Found in lib/kitchen/pulumi/config_attribute/directory.rb and 4 other locations - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/backend.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/config_file.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/secrets_provider.rb on lines 8..28
lib/kitchen/pulumi/config_attribute/test_stack_name.rb on lines 8..29

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

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 Kitchen
  module Pulumi
    module ConfigAttribute
      # Module used for the 'config' instance var on an
      # instance driver. The driver will set the Pulumi stack
Severity: Minor
Found in lib/kitchen/pulumi/config_attribute/secrets.rb and 1 other location - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/config.rb on lines 8..30

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

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 Kitchen
  module Pulumi
    module ConfigAttribute
      # Attribute used to determine if the stack config should be
      # preserved after stack is removed with `pulumi stack rm`
Severity: Minor
Found in lib/kitchen/pulumi/config_attribute/preserve_config.rb and 1 other location - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/refresh_config.rb on lines 8..29

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

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

module Kitchen
  module Pulumi
    module ConfigAttribute
      # {include:Kitchen::Pulumi::ConfigSchemas::Systems}
      #
Severity: Minor
Found in lib/kitchen/pulumi/config_attribute/systems.rb and 2 other locations - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/plugins.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/stack_evolution.rb on lines 8..32

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

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

module Kitchen
  module Pulumi
    module ConfigAttribute
      # Attribute used to override the stack name to use for the stack
      # created for an instance.
Severity: Major
Found in lib/kitchen/pulumi/config_attribute/test_stack_name.rb and 4 other locations - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/backend.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/config_file.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/directory.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/secrets_provider.rb on lines 8..28

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

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 Kitchen
  module Pulumi
    module ConfigAttribute
      # Attribute used to determine if the stack config should be
      # refreshed from the remote before every `pulumi up` command
Severity: Minor
Found in lib/kitchen/pulumi/config_attribute/refresh_config.rb and 1 other location - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/preserve_config.rb on lines 8..30

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

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

module Kitchen
  module Pulumi
    module ConfigAttribute
      # Attribute used to specify the Pulumi backend to use.
      # It contains the URL to the backend, local or remote
Severity: Major
Found in lib/kitchen/pulumi/config_attribute/backend.rb and 4 other locations - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/config_file.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/directory.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/secrets_provider.rb on lines 8..28
lib/kitchen/pulumi/config_attribute/test_stack_name.rb on lines 8..29

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

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

module Kitchen
  module Pulumi
    module ConfigAttribute
      # Attribute used to specify the secrets provider a stack should use
      module SecretsProvider
Severity: Major
Found in lib/kitchen/pulumi/config_attribute/secrets_provider.rb and 4 other locations - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/backend.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/config_file.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/directory.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/test_stack_name.rb on lines 8..29

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

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

module Kitchen
  module Pulumi
    module ConfigAttribute
      # Module used for the 'config_evolution' instance var on an
      # instance driver. The driver will set the Pulumi stack
Severity: Minor
Found in lib/kitchen/pulumi/config_attribute/stack_evolution.rb and 2 other locations - About 25 mins to fix
lib/kitchen/pulumi/config_attribute/plugins.rb on lines 8..29
lib/kitchen/pulumi/config_attribute/systems.rb on lines 6..28

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

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 preview_stack(stack, conf_file, dir = '')
        base_cmd = "preview -r --show-config -s #{stack} #{dir}"
        ::Kitchen::Pulumi::ShellOut.run(
          cmd: "#{base_cmd} #{config_file(conf_file, flag: true)}",
          logger: logger,
Severity: Minor
Found in lib/kitchen/driver/pulumi.rb and 1 other location - About 25 mins to fix
lib/kitchen/driver/pulumi.rb on lines 234..239

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

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 update_stack(stack, conf_file, dir = '')
        base_cmd = "up -y -r --show-config -s #{stack} #{dir}"
        ::Kitchen::Pulumi::ShellOut.run(
          cmd: "#{base_cmd} #{config_file(conf_file, flag: true)}",
          logger: logger,
Severity: Minor
Found in lib/kitchen/driver/pulumi.rb and 1 other location - About 25 mins to fix
lib/kitchen/driver/pulumi.rb on lines 248..253

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

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