ICTU/quality-time

View on GitHub

Showing 681 of 681 total issues

File metrics.py has 720 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Data model metrics."""

from .meta.metric import Addition, Direction, Metric, Tag, Unit

SIG_TUVIT_EVALUATION_CRITERIA = (
Severity: Major
Found in components/shared_code/src/shared_data_model/metrics.py - About 1 day to fix

    File utils.test.js has 482 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { EDIT_ENTITY_PERMISSION, EDIT_REPORT_PERMISSION } from "./context/Permissions"
    import { defaultDesiredResponseTimes } from "./defaults"
    import {
        addCounts,
        capitalize,
    Severity: Minor
    Found in components/frontend/src/utils.test.js - About 7 hrs to fix

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

      export function createTestableSettings() {
          return {
              dateInterval: testableQuery(useDateIntervalURLSearchQuery),
              dateOrder: testableQuery(useDateOrderURLSearchQuery),
              hiddenCards: testableQuery(useHiddenCardsURLSearchQuery),
      Severity: Major
      Found in components/frontend/src/__fixtures__/fixtures.js and 1 other location - About 7 hrs to fix
      components/frontend/src/app_ui_settings.js on lines 84..109

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

      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

      export function useSettings(report_uuid) {
          return {
              dateInterval: useDateIntervalURLSearchQuery(report_uuid),
              dateOrder: useDateOrderURLSearchQuery(report_uuid),
              expandedItems: useExpandedItemsSearchQuery(report_uuid),
      Severity: Major
      Found in components/frontend/src/app_ui_settings.js and 1 other location - About 7 hrs to fix
      components/frontend/src/__fixtures__/fixtures.js on lines 86..111

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

      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

          test("MoveButton can be used to select an item", async () => {
              const mockCallback = jest.fn()
              render(
                  <MoveButton
                      itemType={itemType}
      Severity: Major
      Found in components/frontend/src/widgets/Button.test.js and 1 other location - About 7 hrs to fix
      components/frontend/src/widgets/Button.test.js on lines 238..256

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

      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

          test("CopyButton can be used to select an item", async () => {
              const mockCallback = jest.fn()
              render(
                  <CopyButton
                      itemType={itemType}
      Severity: Major
      Found in components/frontend/src/widgets/Button.test.js and 1 other location - About 7 hrs to fix
      components/frontend/src/widgets/Button.test.js on lines 286..304

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

      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

      File sonarqube.py has 458 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """SonarQube source."""
      
      from pydantic import HttpUrl
      
      from shared_data_model.meta.base import StrEnum
      Severity: Minor
      Found in components/shared_code/src/shared_data_model/sources/sonarqube.py - About 7 hrs to fix

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

        it("does not crash when the technical end date is invalid", async () => {
            render(
                <DataModel.Provider value={{ metrics: { violations: { direction: "<", unit: "violations" } } }}>
                    <MeasurementTarget
                        metric={{
        components/frontend/src/measurement/MeasurementTarget.test.js on lines 55..72
        components/frontend/src/measurement/MeasurementTarget.test.js on lines 74..91

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

        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("renders the technical debt popup if technical debt is accepted", async () => {
            render(
                <DataModel.Provider value={{ metrics: { violations: { direction: "<", unit: "violations" } } }}>
                    <MeasurementTarget
                        metric={{
        components/frontend/src/measurement/MeasurementTarget.test.js on lines 74..91
        components/frontend/src/measurement/MeasurementTarget.test.js on lines 153..170

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

        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("renders the technical debt popup if technical debt is accepted with a future end date", async () => {
            render(
                <DataModel.Provider value={{ metrics: { violations: { direction: "<", unit: "violations" } } }}>
                    <MeasurementTarget
                        metric={{
        components/frontend/src/measurement/MeasurementTarget.test.js on lines 55..72
        components/frontend/src/measurement/MeasurementTarget.test.js on lines 153..170

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

        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

            entities={
                "merge_requests": Entity(
                    name="merge request",
                    attributes=[
                        EntityAttribute(name="Merge request", key="title", url="url"),
        components/shared_code/src/shared_data_model/sources/gitlab.py on lines 249..260

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

        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

                "merge_requests": Entity(
                    name="merge request",
                    attributes=[
                        EntityAttribute(name="Merge request", key="title", url="url"),
                        EntityAttribute(name="Target branch"),
        components/shared_code/src/shared_data_model/sources/github.py on lines 87..99

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 105.

        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("hides a subject if all its tags are hidden", async () => {
            history.push("?hidden_tags=other,tag")
            const hiddenTags = renderHook(() => useHiddenTagsURLSearchQuery())
            renderDashboard({ reportToRender: report, hiddenTags: hiddenTags.result.current })
            expect(screen.queryAllByText(/Subject title/).length).toBe(0)
        Severity: Major
        Found in components/frontend/src/report/ReportDashboard.test.js and 1 other location - About 5 hrs to fix
        components/frontend/src/report/ReportDashboard.test.js on lines 61..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 148.

        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("hides tags", async () => {
            history.push("?hidden_tags=other")
            const hiddenTags = renderHook(() => useHiddenTagsURLSearchQuery())
            renderDashboard({ reportToRender: report, hiddenTags: hiddenTags.result.current })
            expect(screen.getAllByText(/Subject title/).length).toBe(1)
        Severity: Major
        Found in components/frontend/src/report/ReportDashboard.test.js and 1 other location - About 5 hrs to fix
        components/frontend/src/report/ReportDashboard.test.js on lines 70..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 148.

        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

                        <Grid.Column>
                            <SingleChoiceInput
                                id="tracker-issue-type"
                                error={!!report.issue_tracker?.type && !issueTypeValid}
                                requiredPermissions={[EDIT_REPORT_PERMISSION]}
        Severity: Major
        Found in components/frontend/src/report/IssueTracker.js and 1 other location - About 5 hrs to fix
        components/frontend/src/report/IssueTracker.js on lines 169..188

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

        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

                        <Grid.Column>
                            <SingleChoiceInput
                                id="tracker-project-key"
                                error={!!report.issue_tracker?.type && !projectValid}
                                requiredPermissions={[EDIT_REPORT_PERMISSION]}
        Severity: Major
        Found in components/frontend/src/report/IssueTracker.js and 1 other location - About 5 hrs to fix
        components/frontend/src/report/IssueTracker.js on lines 189..208

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

        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("hides the required actions cards", async () => {
            history.push("?hidden_cards=action_required")
            renderDashboard({ reportToRender: report })
            expect(screen.getAllByText(/Subject title/).length).toBe(1)
            expect(screen.queryAllByText(/Action required/).length).toBe(0)
        Severity: Major
        Found in components/frontend/src/report/ReportDashboard.test.js and 2 other locations - About 5 hrs to fix
        components/frontend/src/report/ReportDashboard.test.js on lines 86..93
        components/frontend/src/report/ReportDashboard.test.js on lines 95..102

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 145.

        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("works for informative metrics", () => {
            history.push("?nr_dates=3&date_interval=1")
            renderSubjectTableRow({ evaluate_targets: false })
            expect(screen.getAllByText("+2").length).toBe(1)
            expect(screen.getAllByLabelText("Metric type changed from 10 to 12 things by +2 things").length).toBe(1)
        Severity: Major
        Found in components/frontend/src/subject/SubjectTableRow.test.js and 1 other location - About 5 hrs to fix
        components/frontend/src/subject/SubjectTableRow.test.js on lines 107..114

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

        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("takes the date order into account", () => {
            history.push("?nr_dates=3&date_interval=1&date_order=ascending")
            renderSubjectTableRow({ ascending: true })
            expect(screen.getAllByText("+2").length).toBe(1)
            expect(screen.getAllByLabelText("Metric type worsened from 10 to 12 things by +2 things").length).toBe(1)
        Severity: Major
        Found in components/frontend/src/subject/SubjectTableRow.test.js and 1 other location - About 5 hrs to fix
        components/frontend/src/subject/SubjectTableRow.test.js on lines 98..105

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

        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("hides the subject cards", async () => {
            history.push("?hidden_cards=subjects")
            renderDashboard({ reportToRender: report })
            expect(screen.queryAllByText(/Subject title/).length).toBe(0)
            expect(screen.getAllByText(/Action required/).length).toBe(1)
        Severity: Major
        Found in components/frontend/src/report/ReportDashboard.test.js and 2 other locations - About 5 hrs to fix
        components/frontend/src/report/ReportDashboard.test.js on lines 95..102
        components/frontend/src/report/ReportDashboard.test.js on lines 104..111

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

        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