teamdigitale/italia-app

View on GitHub

Showing 4,378 of 4,378 total issues

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

  describe("when the platform is Android", () => {
    beforeAll(() => {
      // eslint-disable-next-line @typescript-eslint/no-var-requires
      require("../../../../utils/platform").test_setPlatform("android");
    });
ts/components/services/ServiceMetadata/__tests__/ServiceMetadata.test.tsx on lines 277..322

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

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 machine.test.ts has 819 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable sonarjs/no-identical-functions */
/* eslint-disable functional/no-let */
import { waitFor } from "@testing-library/react-native";
import { interpret, StateValue } from "xstate";
import { IbanDTO } from "../../../../../../definitions/idpay/IbanDTO";
Severity: Major
Found in ts/features/idpay/configuration/xstate/__tests__/machine.test.ts - About 1 day to fix

    File pagopa.ts has 812 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * pagoPA backend client, with functions
     * to call the different API available
     */
    import * as r from "@pagopa/ts-commons/lib/requests";
    Severity: Major
    Found in ts/api/pagopa.ts - About 1 day to fix

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

        it("should return hidden when all visible payments are processed", () => {
          const sequenceOfActions: ReadonlyArray<Action> = [
            updatePaymentForMessage.failure({
              messageId: "m1" as UIMessageId,
              paymentId: "c1n1",
      Severity: Major
      Found in ts/features/pn/store/reducers/__test__/payments.test.ts and 2 other locations - About 1 day to fix
      ts/features/pn/store/reducers/__test__/payments.test.ts on lines 89..151
      ts/features/pn/store/reducers/__test__/payments.test.ts on lines 152..214

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

      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("should return visibleEnabled when at least one visible payment has completed processing", () => {
          const sequenceOfActions: ReadonlyArray<Action> = [
            updatePaymentForMessage.failure({
              messageId: "m1" as UIMessageId,
              paymentId: "c1n5",
      Severity: Major
      Found in ts/features/pn/store/reducers/__test__/payments.test.ts and 2 other locations - About 1 day to fix
      ts/features/pn/store/reducers/__test__/payments.test.ts on lines 26..88
      ts/features/pn/store/reducers/__test__/payments.test.ts on lines 89..151

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

      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("should return visibleLoading when all visible payments are processing", () => {
          const sequenceOfActions: ReadonlyArray<Action> = [
            updatePaymentForMessage.failure({
              messageId: "m1" as UIMessageId,
              paymentId: "c1n6",
      Severity: Major
      Found in ts/features/pn/store/reducers/__test__/payments.test.ts and 2 other locations - About 1 day to fix
      ts/features/pn/store/reducers/__test__/payments.test.ts on lines 26..88
      ts/features/pn/store/reducers/__test__/payments.test.ts on lines 152..214

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

      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* handleLoadNextPageMessages(
        getMessages: BackendClient["getMessages"],
        action: ActionType<typeof loadNextPageMessages.request>
      ) {
        const { filter, pageSize, cursor } = action.payload;
      Severity: Major
      Found in ts/features/messages/saga/handleLoadNextPageMessages.ts and 1 other location - About 1 day to fix
      ts/features/messages/saga/handleLoadPreviousPageMessages.ts on lines 14..62

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

      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* handleLoadPreviousPageMessages(
        getMessages: BackendClient["getMessages"],
        action: ActionType<typeof loadPreviousPageMessagesAction.request>
      ) {
        const { filter, cursor, pageSize } = action.payload;
      Severity: Major
      Found in ts/features/messages/saga/handleLoadPreviousPageMessages.ts and 1 other location - About 1 day to fix
      ts/features/messages/saga/handleLoadNextPageMessages.ts on lines 17..65

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

      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

        describe("Test migrationKeyTag()", () => {
          it("should return a keyTag as O.some(string) when keyTagOption is O.some(string)", () => {
            const persistedState = {
              keyTag: O.some("tag"),
              publicKey: O.none
      Severity: Major
      Found in ts/features/lollipop/store/__tests__/index.test.ts and 1 other location - About 1 day to fix
      ts/features/lollipop/store/__tests__/index.test.ts on lines 63..103

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

      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

        config: {
          premiumMessages: {
            opt_in_out_enabled: false
          },
          bpd: {
      Severity: Major
      Found in ts/store/reducers/__mock__/backendStatus.ts and 1 other location - About 1 day to fix
      ts/store/reducers/__mock__/backendStatus.ts on lines 314..397

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

      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

        describe("Test migrationKeyTagFunctional", () => {
          it("should return a keyTag as O.some(string) when keyTagOption is O.some(string)", () => {
            const persistedState = {
              keyTag: O.some("tag"),
              publicKey: O.none
      Severity: Major
      Found in ts/features/lollipop/store/__tests__/index.test.ts and 1 other location - About 1 day to fix
      ts/features/lollipop/store/__tests__/index.test.ts on lines 26..62

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

      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 const baseBackendConfig: Config = {
        premiumMessages: {
          opt_in_out_enabled: false
        },
        bpd: {
      Severity: Major
      Found in ts/store/reducers/__mock__/backendStatus.ts and 1 other location - About 1 day to fix
      ts/store/reducers/__mock__/backendStatus.ts on lines 222..305

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

      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 MessageBottomMenu.test.tsx has 787 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from "react";
      import { createStore } from "redux";
      import { applicationChangeState } from "../../../../store/actions/application";
      import { preferencesDesignSystemSetEnabled } from "../../../../store/actions/persistedPreferences";
      import { appReducer } from "../../../../store/reducers";
      Severity: Major
      Found in ts/features/pn/components/__test__/MessageBottomMenu.test.tsx - About 1 day to fix

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

        describe("Services home featuredServices reducer", () => {
          it("should have initial state", () => {
            const state = appReducer(undefined, applicationChangeState("active"));
        
            expect(state.features.services.home.featuredServices).toStrictEqual(
        ts/features/services/home/store/reducers/__tests__/store.test.ts on lines 439..482

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

        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

        describe("Services home featuredInstitutions reducer", () => {
          it("should have initial state", () => {
            const state = appReducer(undefined, applicationChangeState("active"));
        
            expect(state.features.services.home.featuredInstitutions).toStrictEqual(
        ts/features/services/home/store/reducers/__tests__/store.test.ts on lines 625..668

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

        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

        describe(`Test generate signature base for multiple custom signatures RSAKey`, () => {
          const customContent: CutsomContentToSignInput = {
            customContentToSign: { tos: "ASDFFA324SDFA==", sign: "DAFDEFAF323DSFA==" },
            keyInfo: testKeyInfoWithRSAKey,
            keyTag: testKeyInfoWithRSAKey.keyTag!,
        ts/features/lollipop/httpSignature/__tests__/signature.test.ts on lines 243..277

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

        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

        describe(`Test generate signature base for multiple custom signatures ECKey`, () => {
          const customContent: CutsomContentToSignInput = {
            customContentToSign: { tos: "ASDFFA324SDFA==", sign: "DAFDEFAF323DSFA==" },
            keyInfo: testKeyInfoWithECKey,
            keyTag: testKeyInfoWithECKey.keyTag!,
        ts/features/lollipop/httpSignature/__tests__/signature.test.ts on lines 207..241

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

        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

            testSaga(initializeApplicationSaga)
              .next()
              .call(checkAppHistoryVersionSaga)
              .next()
              .call(initMixpanel)
        Severity: Major
        Found in ts/sagas/__tests__/initializeApplicationSaga.test.ts and 2 other locations - About 1 day to fix
        ts/sagas/__tests__/initializeApplicationSaga.test.ts on lines 122..158
        ts/sagas/__tests__/initializeApplicationSaga.test.ts on lines 164..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 326.

        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

            testSaga(initializeApplicationSaga)
              .next()
              .call(checkAppHistoryVersionSaga)
              .next()
              .call(initMixpanel)
        Severity: Major
        Found in ts/sagas/__tests__/initializeApplicationSaga.test.ts and 2 other locations - About 1 day to fix
        ts/sagas/__tests__/initializeApplicationSaga.test.ts on lines 164..200
        ts/sagas/__tests__/initializeApplicationSaga.test.ts on lines 211..247

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

        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

            testSaga(initializeApplicationSaga)
              .next()
              .call(checkAppHistoryVersionSaga)
              .next()
              .call(initMixpanel)
        Severity: Major
        Found in ts/sagas/__tests__/initializeApplicationSaga.test.ts and 2 other locations - About 1 day to fix
        ts/sagas/__tests__/initializeApplicationSaga.test.ts on lines 122..158
        ts/sagas/__tests__/initializeApplicationSaga.test.ts on lines 211..247

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

        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