theforeman/foreman_remote_execution

View on GitHub

Showing 250 of 250 total issues

Identical blocks of code found in 6 locations. Consider refactoring.
Open

    await act(async () => {
      fireEvent.click(screen.getByText(WIZARD_TITLES.advanced));
      jest.advanceTimersByTime(1000); // to handle pf4 date picker popover
    });
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 110..113
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 222..225
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 295..298
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 369..372
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 389..392

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

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 initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def initialize(template, host = nil, invocation = nil, input_values = nil, preview = false, templates_stack = [])
Severity: Minor
Found in app/models/input_template_renderer.rb - About 45 mins to fix

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

        await act(async () => {
          fireEvent.click(screen.getByText(WIZARD_TITLES.advanced));
          jest.advanceTimersByTime(1000); // to handle pf4 date picker popover
        });
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 187..190
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 222..225
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 295..298
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 369..372
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 389..392

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

    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

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

        await act(async () => {
          fireEvent.click(screen.getByText(WIZARD_TITLES.advanced));
          jest.advanceTimersByTime(1000); // to handle pf4 date picker popover
        });
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 110..113
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 187..190
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 222..225
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 369..372
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 389..392

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

    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

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

        await act(async () => {
          fireEvent.click(screen.getByText(WIZARD_TITLES.advanced));
          jest.advanceTimersByTime(1000); // to handle pf4 date picker popover
        });
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 110..113
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 187..190
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 222..225
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 295..298
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 389..392

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

    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

    Function runFeature has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    export const runFeature = (hostId, feature, label, hostSearch) => dispatch => {
      const url = foremanUrl(
        hostId
          ? `/job_invocations?feature=${feature}&host_ids%5B%5D=${hostId}`
          : `/job_invocations?feature=${feature}&search=${hostSearch}`
    Severity: Minor
    Found in webpack/react_app/components/FeaturesDropdown/actions.js - About 45 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

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

        await act(async () => {
          fireEvent.click(screen.getByText(WIZARD_TITLES.advanced));
          jest.advanceTimersByTime(1000); // to handle pf4 date picker popover
        });
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 110..113
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 187..190
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 222..225
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 295..298
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 369..372

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

    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

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

        await act(async () => {
          fireEvent.click(screen.getByText(WIZARD_TITLES.advanced));
          jest.advanceTimersByTime(1000); // to handle pf4 date picker popover
        });
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 110..113
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 187..190
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 295..298
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 369..372
    webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 389..392

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

    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

      useEffect(() => {
        dispatch(
          get({
            key: HOSTS_API,
            url: '/api/hosts',
    Severity: Minor
    Found in webpack/JobWizard/steps/ReviewDetails/index.js and 1 other location - About 40 mins to fix
    webpack/JobWizard/steps/HostsAndInputs/index.js on lines 84..95

    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

        debounce(() => {
          dispatch(
            get({
              key: HOSTS_API,
              url: '/api/hosts',
    Severity: Minor
    Found in webpack/JobWizard/steps/HostsAndInputs/index.js and 1 other location - About 40 mins to fix
    webpack/JobWizard/steps/ReviewDetails/index.js on lines 60..71

    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

        await act(async () => {
          fireEvent.click(dayTue);
          fireEvent.change(dayTue, {
            target: { checked: true },
          });
    Severity: Minor
    Found in webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js and 1 other location - About 40 mins to fix
    webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js on lines 380..385

    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

        await act(async () => {
          fireEvent.click(daySat);
          fireEvent.change(daySat, {
            target: { checked: true },
          });
    Severity: Minor
    Found in webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js and 1 other location - About 40 mins to fix
    webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js on lines 374..379

    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

        await act(async () => {
          fireEvent.click(screen.getByText('host1'));
          fireEvent.click(screen.getByText('host2'));
        });
    webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js on lines 262..265

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

    export const SelectedChips = ({
      selectedHosts,
      setSelectedHosts,
      selectedHostCollections,
      setSelectedHostCollections,
    Severity: Minor
    Found in webpack/JobWizard/steps/HostsAndInputs/SelectedChips.js and 2 other locations - About 40 mins to fix
    webpack/JobWizard/steps/form/SearchSelect.js on lines 10..103
    webpack/react_app/components/TargetingHosts/TargetingHostsPage.js on lines 15..58

    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

        act(() => {
          fireEvent.click(screen.getByText('Now'));
          fireEvent.click(screen.getByText('After'));
        });
    Severity: Minor
    Found in webpack/JobWizard/steps/Schedule/__tests__/Schedule.test.js and 1 other location - About 40 mins to fix
    webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 54..57

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

    const TargetingHostsPage = ({
      handleSearch,
      searchQuery,
      statusFilter,
      statusFilterReset,
    webpack/JobWizard/steps/HostsAndInputs/SelectedChips.js on lines 45..109
    webpack/JobWizard/steps/form/SearchSelect.js on lines 10..103

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

    export const SearchSelect = ({
      name,
      selected,
      setSelected,
      placeholderText,
    Severity: Minor
    Found in webpack/JobWizard/steps/form/SearchSelect.js and 2 other locations - About 40 mins to fix
    webpack/JobWizard/steps/HostsAndInputs/SelectedChips.js on lines 45..109
    webpack/react_app/components/TargetingHosts/TargetingHostsPage.js on lines 15..58

    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

    Method inner_plan has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

          def inner_plan(job_invocation, host, template_invocation, proxy_selector, options)
    Severity: Minor
    Found in app/lib/actions/remote_execution/run_host_job.rb - About 35 mins to fix

      Method plan has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def plan(job_invocation, host, template_invocation, proxy_selector = ::RemoteExecutionProxySelector.new, options = {})
      Severity: Minor
      Found in app/lib/actions/remote_execution/run_host_job.rb - About 35 mins to fix

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

        TemplateInputs.propTypes = {
          inputs: PropTypes.array.isRequired,
          value: PropTypes.object,
          setValue: PropTypes.func.isRequired,
        };
        Severity: Minor
        Found in webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js and 1 other location - About 35 mins to fix
        webpack/JobWizard/steps/AdvancedFields/Fields.js on lines 266..270

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

        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