ICTU/quality-time

View on GitHub

Showing 564 of 692 total issues

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

it("renders a string parameter with placeholder", () => {
    renderSourceParameters({ placeholder: "Placeholder" })
    expect(screen.queryAllByPlaceholderText(/Placeholder/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/source/SourceParameters.test.js and 6 other locations - About 55 mins to fix
components/frontend/src/metric/MetricDebtParameters.test.js on lines 114..117
components/frontend/src/metric/Target.test.js on lines 80..83
components/frontend/src/source/SourceEntity.test.js on lines 37..40
components/frontend/src/source/SourceEntity.test.js on lines 52..55
components/frontend/src/source/SourceParameters.test.js on lines 76..79
components/frontend/src/source/SourceTypeHeader.test.js on lines 31..34

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

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

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

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

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

Refactorings

Further Reading

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

it("shows spinner", async () => {
    render(<App />)
    expect(screen.getAllByLabelText(/Loading/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/App.test.js and 3 other locations - About 55 mins to fix
components/frontend/src/fields/Comment.test.js on lines 5..8
components/frontend/src/fields/IntegerInput.test.js on lines 106..109
components/frontend/src/header_footer/DownloadAsPDFButton.test.js on lines 13..16

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

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

it("renders the source parameter value", () => {
    renderSourceParameters({ source_parameter_value: "Value" })
    expect(screen.queryAllByDisplayValue(/Value/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/source/SourceParameters.test.js and 6 other locations - About 55 mins to fix
components/frontend/src/metric/MetricDebtParameters.test.js on lines 114..117
components/frontend/src/metric/Target.test.js on lines 80..83
components/frontend/src/source/SourceEntity.test.js on lines 37..40
components/frontend/src/source/SourceEntity.test.js on lines 52..55
components/frontend/src/source/SourceParameters.test.js on lines 66..69
components/frontend/src/source/SourceTypeHeader.test.js on lines 31..34

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

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

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

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

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

Refactorings

Further Reading

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

it("has the comment label", () => {
    render(<Comment />)
    expect(screen.getAllByText(/Comment/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/fields/Comment.test.js and 3 other locations - About 55 mins to fix
components/frontend/src/App.test.js on lines 45..48
components/frontend/src/fields/IntegerInput.test.js on lines 106..109
components/frontend/src/header_footer/DownloadAsPDFButton.test.js on lines 13..16

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

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

it("displays the postfix", () => {
    renderReadOnlyInput({ unit: "postfix" })
    expect(screen.queryByText(/postfix/)).not.toBe(null)
})
Severity: Major
Found in components/frontend/src/fields/ReadOnlyInput.test.js and 2 other locations - About 55 mins to fix
components/frontend/src/fields/PasswordInput.test.js on lines 14..17
components/frontend/src/fields/ReadOnlyInput.test.js on lines 16..19

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

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

it("displays the status category done", () => {
    renderIssueStatus({ statusCategory: "done" })
    expect(screen.getByText(/123/).className).toContain("green")
})
Severity: Major
Found in components/frontend/src/issue/IssueStatus.test.js and 2 other locations - About 55 mins to fix
components/frontend/src/issue/IssueStatus.test.js on lines 74..77
components/frontend/src/issue/IssueStatus.test.js on lines 79..82

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

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

it("displays the default target if changed", () => {
    renderMetricTarget({ type: "violations_with_default_target" })
    expect(screen.queryAllByText(/default:/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/metric/Target.test.js and 6 other locations - About 55 mins to fix
components/frontend/src/metric/MetricDebtParameters.test.js on lines 114..117
components/frontend/src/source/SourceEntity.test.js on lines 37..40
components/frontend/src/source/SourceEntity.test.js on lines 52..55
components/frontend/src/source/SourceParameters.test.js on lines 66..69
components/frontend/src/source/SourceParameters.test.js on lines 76..79
components/frontend/src/source/SourceTypeHeader.test.js on lines 31..34

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

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

it("renders the fixed status", () => {
    renderSourceEntity({ status: "fixed" })
    expect(screen.getAllByText(/Fixed/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/source/SourceEntity.test.js and 6 other locations - About 55 mins to fix
components/frontend/src/metric/MetricDebtParameters.test.js on lines 114..117
components/frontend/src/metric/Target.test.js on lines 80..83
components/frontend/src/source/SourceEntity.test.js on lines 52..55
components/frontend/src/source/SourceParameters.test.js on lines 66..69
components/frontend/src/source/SourceParameters.test.js on lines 76..79
components/frontend/src/source/SourceTypeHeader.test.js on lines 31..34

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

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

it("does not point users to specific information in the docs if the information is for other metric types", () => {
    renderSourceTypeHeader({ other_metric: "Generic documentation" })
    expect(screen.queryAllByText(/specific information/).length).toBe(0)
})
Severity: Major
Found in components/frontend/src/source/SourceTypeHeader.test.js and 6 other locations - About 55 mins to fix
components/frontend/src/metric/MetricDebtParameters.test.js on lines 114..117
components/frontend/src/metric/Target.test.js on lines 80..83
components/frontend/src/source/SourceEntity.test.js on lines 37..40
components/frontend/src/source/SourceEntity.test.js on lines 52..55
components/frontend/src/source/SourceParameters.test.js on lines 66..69
components/frontend/src/source/SourceParameters.test.js on lines 76..79

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

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

it("displays the prefix", () => {
    renderReadOnlyInput({ prefix: "prefix" })
    expect(screen.queryByText(/prefix/)).not.toBe(null)
})
Severity: Major
Found in components/frontend/src/fields/ReadOnlyInput.test.js and 2 other locations - About 55 mins to fix
components/frontend/src/fields/PasswordInput.test.js on lines 14..17
components/frontend/src/fields/ReadOnlyInput.test.js on lines 21..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

it("displays the status category todo", () => {
    renderIssueStatus({ statusCategory: "todo" })
    expect(screen.getByText(/123/).className).toContain("grey")
})
Severity: Major
Found in components/frontend/src/issue/IssueStatus.test.js and 2 other locations - About 55 mins to fix
components/frontend/src/issue/IssueStatus.test.js on lines 74..77
components/frontend/src/issue/IssueStatus.test.js on lines 84..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 53.

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

it("shows days ago for the technical debt end date", () => {
    renderMetricDebtParameters({ debt_end_date: "2000-01-01" })
    expect(screen.getAllByLabelText(/years ago/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/metric/MetricDebtParameters.test.js and 6 other locations - About 55 mins to fix
components/frontend/src/metric/Target.test.js on lines 80..83
components/frontend/src/source/SourceEntity.test.js on lines 37..40
components/frontend/src/source/SourceEntity.test.js on lines 52..55
components/frontend/src/source/SourceParameters.test.js on lines 66..69
components/frontend/src/source/SourceParameters.test.js on lines 76..79
components/frontend/src/source/SourceTypeHeader.test.js on lines 31..34

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

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

it("renders the first seen datetime", () => {
    renderSourceEntity({ first_seen: "2023-07-17" })
    expect(screen.getAllByText(/ago/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/source/SourceEntity.test.js and 6 other locations - About 55 mins to fix
components/frontend/src/metric/MetricDebtParameters.test.js on lines 114..117
components/frontend/src/metric/Target.test.js on lines 80..83
components/frontend/src/source/SourceEntity.test.js on lines 37..40
components/frontend/src/source/SourceParameters.test.js on lines 66..69
components/frontend/src/source/SourceParameters.test.js on lines 76..79
components/frontend/src/source/SourceTypeHeader.test.js on lines 31..34

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

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

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

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

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

Refactorings

Further Reading

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

it("renders missing value as 0", () => {
    render(<IntegerInput />)
    expect(screen.queryAllByDisplayValue(/0/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/fields/IntegerInput.test.js and 3 other locations - About 55 mins to fix
components/frontend/src/App.test.js on lines 45..48
components/frontend/src/fields/Comment.test.js on lines 5..8
components/frontend/src/header_footer/DownloadAsPDFButton.test.js on lines 13..16

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

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

it("does not show the issues card without issue tracker", async () => {
    renderDashboard({ reportToRender: report })
    expect(screen.queryAllByText(/Issues/).length).toBe(0)
})
Severity: Minor
Found in components/frontend/src/report/ReportDashboard.test.js and 1 other location - About 55 mins to fix
components/frontend/src/subject/SubjectTable.test.js on lines 155..158

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

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

it("shows the overrun column when showing multiple dates", () => {
    renderSubjectTable({ dates: dates })
    expect(screen.queryAllByText(/[Oo]verrun/).length).toBe(1)
})
Severity: Minor
Found in components/frontend/src/subject/SubjectTable.test.js and 1 other location - About 55 mins to fix
components/frontend/src/report/ReportDashboard.test.js on lines 132..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 53.

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

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

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

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

Refactorings

Further Reading

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

SubjectTitle.propTypes = {
    atReportsOverview: bool,
    firstSubject: bool,
    lastSubject: bool,
    reload: func,
Severity: Major
Found in components/frontend/src/subject/SubjectTitle.js and 7 other locations - About 50 mins to fix
components/frontend/src/fields/Input.js on lines 45..54
components/frontend/src/report/ReportsOverviewDashboard.js on lines 141..150
components/frontend/src/source/Source.js on lines 227..236
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/widgets/Button.js on lines 94..103
components/frontend/src/widgets/HeaderWithDetails.js on lines 33..42
components/frontend/src/widgets/TableHeaderCell.js on lines 45..54

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

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

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

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

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

Refactorings

Further Reading

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

Input.propTypes = {
    editableLabel: labelPropType,
    label: labelPropType,
    error: bool,
    prefix: string,
Severity: Major
Found in components/frontend/src/fields/Input.js and 7 other locations - About 50 mins to fix
components/frontend/src/report/ReportsOverviewDashboard.js on lines 141..150
components/frontend/src/source/Source.js on lines 227..236
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 146..155
components/frontend/src/widgets/Button.js on lines 94..103
components/frontend/src/widgets/HeaderWithDetails.js on lines 33..42
components/frontend/src/widgets/TableHeaderCell.js on lines 45..54

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

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

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

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

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

Refactorings

Further Reading

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

ActionButton.propTypes = {
    action: string,
    disabled: bool,
    icon: string,
    itemType: string,
Severity: Major
Found in components/frontend/src/widgets/Button.js and 7 other locations - About 50 mins to fix
components/frontend/src/fields/Input.js on lines 45..54
components/frontend/src/report/ReportsOverviewDashboard.js on lines 141..150
components/frontend/src/source/Source.js on lines 227..236
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 146..155
components/frontend/src/widgets/HeaderWithDetails.js on lines 33..42
components/frontend/src/widgets/TableHeaderCell.js on lines 45..54

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

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

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

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

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

Refactorings

Further Reading

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

ReportsOverviewDashboard.propTypes = {
    dates: datesPropType,
    layout: array,
    measurements: measurementsPropType,
    onClickTag: func,
Severity: Major
Found in components/frontend/src/report/ReportsOverviewDashboard.js and 7 other locations - About 50 mins to fix
components/frontend/src/fields/Input.js on lines 45..54
components/frontend/src/source/Source.js on lines 227..236
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 146..155
components/frontend/src/widgets/Button.js on lines 94..103
components/frontend/src/widgets/HeaderWithDetails.js on lines 33..42
components/frontend/src/widgets/TableHeaderCell.js on lines 45..54

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

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