theforeman/foreman_remote_execution

View on GitHub

Showing 140 of 230 total issues

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

SelectedChip.propTypes = {
  categoryName: PropTypes.string.isRequired,
  selected: PropTypes.array.isRequired,
  setSelected: PropTypes.func.isRequired,
  setLabel: PropTypes.func.isRequired,
Severity: Major
Found in webpack/JobWizard/steps/HostsAndInputs/SelectedChips.js and 1 other location - About 1 hr to fix
webpack/JobWizard/steps/Schedule/ScheduleType.js on lines 94..99

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

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

    formProps={{
      label: __('Timeout to kill'),
      labelIcon: helpLabel(
        __(
          'Time in seconds from the start on the remote host after which the job should be killed.'
Severity: Major
Found in webpack/JobWizard/steps/AdvancedFields/Fields.js and 1 other location - About 1 hr to fix
webpack/JobWizard/steps/AdvancedFields/Fields.js on lines 152..164

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

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

    formProps={{
      label: __('Concurrency level'),
      labelIcon: helpLabel(
        __(
          'Run at most N tasks at a time. If this is set and proxy batch triggering is enabled, then tasks are triggered on the smart proxy in batches of size 1.'
Severity: Major
Found in webpack/JobWizard/steps/AdvancedFields/Fields.js and 1 other location - About 1 hr to fix
webpack/JobWizard/steps/AdvancedFields/Fields.js on lines 35..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 61.

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
Severity: Major
Found in webpack/JobWizard/__tests__/validation.test.js and 10 other locations - About 1 hr to fix
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
Severity: Major
Found in webpack/JobWizard/__tests__/integration.test.js and 10 other locations - About 1 hr to fix
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 111..117
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

    render(
      <MockedProvider mocks={gqlMock} addTypename={false}>
        <Provider store={store}>
          <JobWizard />
        </Provider>
webpack/JobWizard/__tests__/integration.test.js on lines 90..96
webpack/JobWizard/__tests__/validation.test.js on lines 32..38
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 103..109
webpack/JobWizard/steps/AdvancedFields/__tests__/AdvancedFields.test.js on lines 180..186
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 19..25
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 143..149
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 167..173
webpack/JobWizard/steps/HostsAndInputs/__tests__/HostsAndInputs.test.js on lines 186..192
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 16..22
webpack/JobWizard/steps/HostsAndInputs/__tests__/TemplateInputs.test.js on lines 54..60

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

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

            {jobOrganization?.id !== currentOrganization?.id && (
              <Alert
                ouiaId="job-wizard-alert-organization"
                isInline
                className="job-wizard-alert"
Severity: Major
Found in webpack/JobWizard/JobWizardPageRerun.js and 1 other location - About 1 hr to fix
webpack/JobWizard/JobWizardPageRerun.js on lines 88..102

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

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

            {jobLocation?.id !== currentLocation?.id && (
              <Alert
                ouiaId="job-wizard-alert-location"
                isInline
                className="job-wizard-alert"
Severity: Major
Found in webpack/JobWizard/JobWizardPageRerun.js and 1 other location - About 1 hr to fix
webpack/JobWizard/JobWizardPageRerun.js on lines 73..87

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

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

            <DescriptionListGroup>
              <DescriptionListTerm>{__('Scheduled at:')}</DescriptionListTerm>
              <DescriptionListDescription>
                {formattedStartDate || <DefaultLoaderEmptyState />}
              </DescriptionListDescription>
webpack/JobInvocationDetail/JobInvocationOverview.js on lines 39..44
webpack/JobInvocationDetail/JobInvocationOverview.js on lines 51..56

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

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

      <DescriptionListGroup>
        <DescriptionListTerm>{__('Effective user:')}</DescriptionListTerm>
        <DescriptionListDescription>
          {effectiveUser || <DefaultLoaderEmptyState />}
        </DescriptionListDescription>
Severity: Major
Found in webpack/JobInvocationDetail/JobInvocationOverview.js and 2 other locations - About 1 hr to fix
webpack/JobInvocationDetail/JobInvocationOverview.js on lines 51..56
webpack/JobInvocationDetail/JobInvocationSystemStatusChart.js on lines 130..135

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

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

      <DescriptionListGroup>
        <DescriptionListTerm>{__('SSH user:')}</DescriptionListTerm>
        <DescriptionListDescription>
          {sshUser || <DefaultLoaderEmptyState />}
        </DescriptionListDescription>
Severity: Major
Found in webpack/JobInvocationDetail/JobInvocationOverview.js and 2 other locations - About 1 hr to fix
webpack/JobInvocationDetail/JobInvocationOverview.js on lines 39..44
webpack/JobInvocationDetail/JobInvocationSystemStatusChart.js on lines 130..135

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

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

    selectedTargets.hosts.length > 0 ||
    selectedTargets.hostCollections.length > 0 ||
    selectedTargets.hostGroups.length > 0 ||
    hostsSearchQuery.length > 0;
Severity: Major
Found in webpack/JobWizard/JobWizard.js and 1 other location - About 1 hr to fix
webpack/JobWizard/steps/HostsAndInputs/index.js on lines 61..64

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

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