ICTU/quality-time

View on GitHub

Showing 555 of 694 total issues

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 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 doing", () => {
    renderIssueStatus({ statusCategory: "doing" })
    expect(screen.getByText(/123/).className).toContain("blue")
})
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 79..82
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 2 locations. Consider refactoring.
Open

                    <WarningMessage
                        showIf={Boolean(project_key && issue_type && !issueEpicFieldSupported)}
                        header="Epic links not supported"
                        content={`The issue type '${issue_type}' in project '${project_key}' does not support adding epic links when creating issues, so no epic link will be added to new issues.`}
                    />
Severity: Minor
Found in components/frontend/src/report/IssueTracker.js and 1 other location - About 55 mins to fix
components/frontend/src/report/IssueTracker.js on lines 251..255

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

                    <WarningMessage
                        showIf={Boolean(project_key && issue_type && !labelFieldSupported)}
                        header="Labels not supported"
                        content={`The issue type '${issue_type}' in project '${project_key}' does not support adding labels when creating issues, so no labels will be added to new issues.`}
                    />
Severity: Minor
Found in components/frontend/src/report/IssueTracker.js and 1 other location - About 55 mins to fix
components/frontend/src/report/IssueTracker.js on lines 228..232

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 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 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 204..213
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 125..134
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 46..55

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

HeaderWithDetails.propTypes = {
    children: childrenPropType,
    className: string,
    header: node,
    item_uuid: string,
Severity: Major
Found in components/frontend/src/widgets/HeaderWithDetails.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 204..213
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 125..134
components/frontend/src/widgets/Button.js on lines 94..103
components/frontend/src/widgets/TableHeaderCell.js on lines 46..55

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 204..213
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 125..134
components/frontend/src/widgets/HeaderWithDetails.js on lines 33..42
components/frontend/src/widgets/TableHeaderCell.js on lines 46..55

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

Source.propTypes = {
    changed_fields: stringsPropType,
    first_source: bool,
    last_source: bool,
    measurement_source: measurementSourcePropType,
Severity: Major
Found in components/frontend/src/source/Source.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/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 125..134
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 46..55

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

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 204..213
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 46..55

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 204..213
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 125..134
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 46..55

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

SortableTableHeaderCell.propTypes = {
    colSpan: string,
    column: string,
    handleSort: func,
    help: popupContentPropType,
Severity: Major
Found in components/frontend/src/widgets/TableHeaderCell.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 204..213
components/frontend/src/source/Sources.js on lines 73..82
components/frontend/src/subject/SubjectTitle.js on lines 125..134
components/frontend/src/widgets/Button.js on lines 94..103
components/frontend/src/widgets/HeaderWithDetails.js on lines 33..42

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

SourceSegment.propTypes = {
    changed_fields: stringsPropType,
    index: number,
    last_index: number,
    measurement_source: measurementSourcePropType,
Severity: Major
Found in components/frontend/src/source/Sources.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 204..213
components/frontend/src/subject/SubjectTitle.js on lines 125..134
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 46..55

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

        {
            key: "1",
            first_seen: "2023-07-01",
            integer: "1",
            integer_percentage: "1",
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 2 other locations - About 50 mins to fix
components/frontend/src/source/SourceEntities.test.js on lines 64..75
components/frontend/src/source/SourceEntities.test.js on lines 76..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 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 3 locations. Consider refactoring.
Open

        {
            key: "3",
            first_seen: "2023-07-02",
            integer: "9",
            integer_percentage: "9",
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 2 other locations - About 50 mins to fix
components/frontend/src/source/SourceEntities.test.js on lines 52..63
components/frontend/src/source/SourceEntities.test.js on lines 64..75

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

        {
            key: "2",
            first_seen: "2023-07-03",
            integer: "42",
            integer_percentage: "42",
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 2 other locations - About 50 mins to fix
components/frontend/src/source/SourceEntities.test.js on lines 52..63
components/frontend/src/source/SourceEntities.test.js on lines 76..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 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 2 locations. Consider refactoring.
Open

                    setProjectOptions(json.projects.map(({ key, name }) => ({ key: key, value: key, text: name })))
Severity: Minor
Found in components/frontend/src/report/IssueTracker.js and 1 other location - About 50 mins to fix
components/frontend/src/report/IssueTracker.js on lines 50..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 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 2 locations. Consider refactoring.
Open

it("displays the issue id", () => {
    const { queryByText } = renderIssueStatus()
    expect(queryByText(/123/)).not.toBe(null)
})
Severity: Minor
Found in components/frontend/src/issue/IssueStatus.test.js and 1 other location - About 50 mins to fix
components/frontend/src/issue/IssueStatus.test.js on lines 69..72

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