ICTU/quality-time

View on GitHub

Showing 555 of 694 total issues

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

it("sorts the entities by datetime", async () => {
    renderSourceEntities()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/datetime/))
    expectOrder(["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 162..169
components/frontend/src/source/SourceEntities.test.js on lines 171..178
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 189..196
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 207..214
components/frontend/src/source/SourceEntities.test.js on lines 216..223
components/frontend/src/source/SourceEntities.test.js on lines 225..232
components/frontend/src/source/SourceEntities.test.js on lines 234..241
components/frontend/src/source/SourceEntities.test.js on lines 252..259

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()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/first seen/))
    expectOrder(["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 162..169
components/frontend/src/source/SourceEntities.test.js on lines 171..178
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 207..214
components/frontend/src/source/SourceEntities.test.js on lines 216..223
components/frontend/src/source/SourceEntities.test.js on lines 225..232
components/frontend/src/source/SourceEntities.test.js on lines 234..241
components/frontend/src/source/SourceEntities.test.js on lines 243..250
components/frontend/src/source/SourceEntities.test.js on lines 252..259

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

it("switches tabs", async () => {
    await renderMetricDetails()
    expect(screen.getAllByText(/Metric name/).length).toBe(1)
    fireEvent.click(screen.getByText(/Sources/))
    expect(screen.getAllByText(/Source name/).length).toBe(1)
Severity: Major
Found in components/frontend/src/metric/MetricDetails.test.js and 3 other locations - About 2 hrs to fix
components/frontend/src/metric/MetricDetails.test.js on lines 123..128
components/frontend/src/metric/MetricDetails.test.js on lines 130..135
components/frontend/src/metric/MetricDetails.test.js on lines 137..142

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()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/float/))
    expectOrder(["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 162..169
components/frontend/src/source/SourceEntities.test.js on lines 171..178
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 189..196
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 207..214
components/frontend/src/source/SourceEntities.test.js on lines 225..232
components/frontend/src/source/SourceEntities.test.js on lines 234..241
components/frontend/src/source/SourceEntities.test.js on lines 243..250
components/frontend/src/source/SourceEntities.test.js on lines 252..259

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()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/Entity name status/))
    expectOrder(["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 171..178
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 189..196
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 207..214
components/frontend/src/source/SourceEntities.test.js on lines 216..223
components/frontend/src/source/SourceEntities.test.js on lines 225..232
components/frontend/src/source/SourceEntities.test.js on lines 234..241
components/frontend/src/source/SourceEntities.test.js on lines 243..250
components/frontend/src/source/SourceEntities.test.js on lines 252..259

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()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/Status end date/))
    expectOrder(["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 162..169
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 189..196
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 207..214
components/frontend/src/source/SourceEntities.test.js on lines 216..223
components/frontend/src/source/SourceEntities.test.js on lines 225..232
components/frontend/src/source/SourceEntities.test.js on lines 234..241
components/frontend/src/source/SourceEntities.test.js on lines 243..250
components/frontend/src/source/SourceEntities.test.js on lines 252..259

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()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/minutes/))
    expectOrder(["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 162..169
components/frontend/src/source/SourceEntities.test.js on lines 171..178
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 189..196
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 207..214
components/frontend/src/source/SourceEntities.test.js on lines 216..223
components/frontend/src/source/SourceEntities.test.js on lines 225..232
components/frontend/src/source/SourceEntities.test.js on lines 234..241
components/frontend/src/source/SourceEntities.test.js on lines 243..250

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

it("sets the title", async () => {
    renderReportTitle()
    fireEvent.click(screen.getByTitle(/expand/))
    await userEvent.type(screen.getByLabelText(/Report title/), "New title{Enter}", {
        initialSelectionStart: 0,
Severity: Major
Found in components/frontend/src/report/ReportTitle.test.js and 2 other locations - About 2 hrs to fix
components/frontend/src/report/ReportTitle.test.js on lines 61..69
components/frontend/src/report/ReportTitle.test.js on lines 71..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 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 text", async () => {
    renderSourceEntities()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/text/))
    expectOrder(["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 162..169
components/frontend/src/source/SourceEntities.test.js on lines 171..178
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 189..196
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 207..214
components/frontend/src/source/SourceEntities.test.js on lines 216..223
components/frontend/src/source/SourceEntities.test.js on lines 234..241
components/frontend/src/source/SourceEntities.test.js on lines 243..250
components/frontend/src/source/SourceEntities.test.js on lines 252..259

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()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/date only/))
    expectOrder(["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 162..169
components/frontend/src/source/SourceEntities.test.js on lines 171..178
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 189..196
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 207..214
components/frontend/src/source/SourceEntities.test.js on lines 216..223
components/frontend/src/source/SourceEntities.test.js on lines 225..232
components/frontend/src/source/SourceEntities.test.js on lines 243..250
components/frontend/src/source/SourceEntities.test.js on lines 252..259

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

it("switches tabs to measurement entities", async () => {
    await renderMetricDetails()
    expect(screen.getAllByText(/Metric name/).length).toBe(1)
    fireEvent.click(screen.getByText(/The source/))
    expect(screen.getAllByText(/Attribute status/).length).toBe(1)
Severity: Major
Found in components/frontend/src/metric/MetricDetails.test.js and 3 other locations - About 2 hrs to fix
components/frontend/src/metric/MetricDetails.test.js on lines 116..121
components/frontend/src/metric/MetricDetails.test.js on lines 123..128
components/frontend/src/metric/MetricDetails.test.js on lines 137..142

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()
    expectOrder(["C", "B", "A"])
    await userEvent.click(screen.getByText(/int percentage/))
    expectOrder(["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 162..169
components/frontend/src/source/SourceEntities.test.js on lines 171..178
components/frontend/src/source/SourceEntities.test.js on lines 180..187
components/frontend/src/source/SourceEntities.test.js on lines 189..196
components/frontend/src/source/SourceEntities.test.js on lines 198..205
components/frontend/src/source/SourceEntities.test.js on lines 216..223
components/frontend/src/source/SourceEntities.test.js on lines 225..232
components/frontend/src/source/SourceEntities.test.js on lines 234..241
components/frontend/src/source/SourceEntities.test.js on lines 243..250
components/frontend/src/source/SourceEntities.test.js on lines 252..259

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

it("switches tabs to the trend graph", async () => {
    await renderMetricDetails()
    expect(screen.getAllByText(/Metric name/).length).toBe(1)
    fireEvent.click(screen.getByText(/Trend graph/))
    expect(screen.getAllByText(/Time/).length).toBe(1)
Severity: Major
Found in components/frontend/src/metric/MetricDetails.test.js and 3 other locations - About 2 hrs to fix
components/frontend/src/metric/MetricDetails.test.js on lines 116..121
components/frontend/src/metric/MetricDetails.test.js on lines 123..128
components/frontend/src/metric/MetricDetails.test.js on lines 130..135

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

it("sets the subtitle", async () => {
    renderReportTitle()
    fireEvent.click(screen.getByTitle(/expand/))
    await userEvent.type(screen.getByLabelText(/Report subtitle/), "New subtitle{Enter}", {
        initialSelectionStart: 0,
Severity: Major
Found in components/frontend/src/report/ReportTitle.test.js and 2 other locations - About 2 hrs to fix
components/frontend/src/report/ReportTitle.test.js on lines 51..59
components/frontend/src/report/ReportTitle.test.js on lines 71..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 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 2 locations. Consider refactoring.
Open

    result = render(
        <DarkMode.Provider value={true}>
            <Form>
                <Form.Dropdown options={[{ key: "Hi", value: "Hi", text: "Hi" }]} value={"Hi"} />
            </Form>
components/frontend/src/semantic_ui_react_wrappers/Form.test.js on lines 20..26

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

    result = render(
        <DarkMode.Provider value={false}>
            <Form>
                <Form.Dropdown options={[{ key: "Hi", value: "Hi", text: "Hi" }]} value={"Hi"} />
            </Form>
components/frontend/src/semantic_ui_react_wrappers/Form.test.js on lines 8..14

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

it("shows a parse error", () => {
    renderIssuesRow({ issue_status: [{ issue_id: "FOO-43", parse_error: "Oops" }] })
    expect(screen.queryAllByText(/Parse error/).length).toBe(1)
    expect(screen.queryAllByText(/Oops/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/issue/IssuesRows.test.js and 1 other location - About 2 hrs to fix
components/frontend/src/issue/IssuesRows.test.js on lines 67..71

Duplicated Code

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

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

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

Tuning

This issue has a mass of 93.

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 a connection error", () => {
    renderIssuesRow({ issue_status: [{ issue_id: "FOO-43", connection_error: "Oops" }] })
    expect(screen.queryAllByText(/Connection error/).length).toBe(1)
    expect(screen.queryAllByText(/Oops/).length).toBe(1)
})
Severity: Major
Found in components/frontend/src/issue/IssuesRows.test.js and 1 other location - About 2 hrs to fix
components/frontend/src/issue/IssuesRows.test.js on lines 73..77

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

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 display the sprint in the label if not configured", async () => {
    const { queryByText } = renderIssueStatus({ sprint: true })
    expect(queryByText(/Sprint 42/)).toBe(null)
    expect(queryByText(/active/)).toBe(null)
    expect(queryByText(/from now/)).toBe(null)
Severity: Major
Found in components/frontend/src/issue/IssueStatus.test.js and 1 other location - About 2 hrs to fix
components/frontend/src/issue/IssueStatus.test.js on lines 217..222

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

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 display the release in the label if not configured", async () => {
    const { queryByText } = renderIssueStatus({ release: true })
    expect(queryByText(/1.0/)).toBe(null)
    expect(queryByText(/planned/)).toBe(null)
    expect(queryByText(/from now/)).toBe(null)
Severity: Major
Found in components/frontend/src/issue/IssueStatus.test.js and 1 other location - About 2 hrs to fix
components/frontend/src/issue/IssueStatus.test.js on lines 260..265

Duplicated Code

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

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

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

Tuning

This issue has a mass of 93.

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