ICTU/quality-time

View on GitHub
components/frontend/src/source/SourceEntities.test.js

Summary

Maintainability
F
4 days
Test Coverage

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

it("sorts the entities by text", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/text/))
    assertOrder(["A", "B", "C"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by status end date", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/Status end date/))
    assertOrder(["A", "C", "B"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by status rationale", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/Status rationale/))
    assertOrder(["A", "C", "B"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by integer percentage", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/int percentage/))
    assertOrder(["C", "A", "B"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by integer", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/integer/))
    assertOrder(["C", "A", "B"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by minutes", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/minutes/))
    assertOrder(["C", "B", "A"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191

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

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

it("sorts the entities by date", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/date only/))
    assertOrder(["C", "A", "B"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by status", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/Entity name status/))
    assertOrder(["C", "B", "A"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by first seen date", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/first seen/))
    assertOrder(["C", "A", "B"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by float", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/float/))
    assertOrder(["A", "B", "C"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 184..191
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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

it("sorts the entities by datetime", async () => {
    renderSourceEntities()
    assertOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/datetime/))
    assertOrder(["C", "A", "B"])
Severity: Major
Found in components/frontend/src/source/SourceEntities.test.js and 10 other locations - About 2 hrs to fix
components/frontend/src/source/SourceEntities.test.js on lines 103..110
components/frontend/src/source/SourceEntities.test.js on lines 112..119
components/frontend/src/source/SourceEntities.test.js on lines 121..128
components/frontend/src/source/SourceEntities.test.js on lines 130..137
components/frontend/src/source/SourceEntities.test.js on lines 139..146
components/frontend/src/source/SourceEntities.test.js on lines 148..155
components/frontend/src/source/SourceEntities.test.js on lines 157..164
components/frontend/src/source/SourceEntities.test.js on lines 166..173
components/frontend/src/source/SourceEntities.test.js on lines 175..182
components/frontend/src/source/SourceEntities.test.js on lines 193..200

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

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 57..68
components/frontend/src/source/SourceEntities.test.js on lines 69..80

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 45..56
components/frontend/src/source/SourceEntities.test.js on lines 69..80

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 45..56
components/frontend/src/source/SourceEntities.test.js on lines 57..68

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

There are no issues that match your filters.

Category
Status