teamdigitale/italia-app

View on GitHub

Showing 4,862 of 4,862 total issues

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

    <Stack.Screen
      name={PaymentsCheckoutRoutes.PAYMENT_CHECKOUT_MAKE}
      component={WalletPaymentMakeScreen}
      options={{
        gestureEnabled: isGestureEnabled,
Severity: Major
Found in ts/features/payments/checkout/navigation/navigator.tsx and 5 other locations - About 35 mins to fix
ts/features/payments/checkout/navigation/navigator.tsx on lines 24..31
ts/features/payments/checkout/navigation/navigator.tsx on lines 32..39
ts/features/payments/checkout/navigation/navigator.tsx on lines 57..64
ts/features/payments/checkout/navigation/navigator.tsx on lines 65..72
ts/features/payments/details/navigation/navigator.tsx on lines 19..23

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

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

    <Stack.Screen
      name={PaymentsCheckoutRoutes.PAYMENT_CHECKOUT_FAILURE}
      component={WalletPaymentFailureScreen}
      options={{
        gestureEnabled: isGestureEnabled,
Severity: Major
Found in ts/features/payments/checkout/navigation/navigator.tsx and 5 other locations - About 35 mins to fix
ts/features/payments/checkout/navigation/navigator.tsx on lines 24..31
ts/features/payments/checkout/navigation/navigator.tsx on lines 32..39
ts/features/payments/checkout/navigation/navigator.tsx on lines 49..56
ts/features/payments/checkout/navigation/navigator.tsx on lines 57..64
ts/features/payments/details/navigation/navigator.tsx on lines 19..23

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

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

  it("should reject invalid PANs", () => {
    invalidPANs.forEach(d => expect(CreditCardPan.is(d)).toBeFalsy());
  });
Severity: Major
Found in ts/utils/__tests__/input.test.ts and 4 other locations - About 35 mins to fix
ts/utils/__tests__/input.test.ts on lines 28..30
ts/utils/__tests__/input.test.ts on lines 57..59
ts/utils/__tests__/input.test.ts on lines 198..200
ts/utils/__tests__/input.test.ts on lines 210..212

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

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

    expect(
      store.getState().features.euCovidCert.byAuthCode[authCode]
    ).toStrictEqual(pot.someError(mockResponseSuccess, errorFromFailure));
ts/features/idpay/code/store/__tests__/store.test.ts on lines 82..84
ts/features/idpay/code/store/__tests__/store.test.ts on lines 105..107
ts/features/idpay/details/store/__test__/store.test.ts on lines 167..169
ts/features/idpay/wallet/store/reducers/__test__/reducer.test.ts on lines 142..149
ts/features/services/details/store/reducers/__tests__/servicePreference.test.ts on lines 83..87
ts/features/services/details/store/reducers/__tests__/servicePreference.test.ts on lines 126..130

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

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

  it("should remove all spaces from the string", () => {
    const input = "a b c d e";
    const result = trimAndLimitValue(input, 10);
    expect(result).toBe("abcde");
  });
Severity: Major
Found in ts/features/payments/checkout/utils/__tests__/index.test.ts and 5 other locations - About 35 mins to fix
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 10..14
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 16..20
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 22..26
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 28..32
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 34..38

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

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

  it("should accept valid CVCs", () => {
    validCVCs.forEach(d => expect(CreditCardCVC.is(d)).toBeTruthy());
  });
Severity: Major
Found in ts/utils/__tests__/input.test.ts and 4 other locations - About 35 mins to fix
ts/utils/__tests__/input.test.ts on lines 28..30
ts/utils/__tests__/input.test.ts on lines 57..59
ts/utils/__tests__/input.test.ts on lines 72..74
ts/utils/__tests__/input.test.ts on lines 210..212

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

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

      <Stack.Screen
        name={ITW_ROUTES.WALLET_REVOCATION_SCREEN}
        component={ItwLifecycleWalletRevocationScreen}
        options={{ headerShown: false, gestureEnabled: false }}
      />
Severity: Major
Found in ts/features/itwallet/navigation/ItwStackNavigator.tsx and 5 other locations - About 35 mins to fix
ts/features/itwallet/navigation/ItwStackNavigator.tsx on lines 183..187
ts/features/messages/navigation/MessagesNavigator.tsx on lines 45..52
ts/features/messages/navigation/MessagesNavigator.tsx on lines 55..62
ts/features/messages/navigation/MessagesNavigator.tsx on lines 67..74
ts/features/payments/onboarding/navigation/navigator.tsx on lines 22..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 47.

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

      <Stack.Screen
        name={ITW_ROUTES.IDENTITY_NOT_MATCHING_SCREEN}
        component={ItwIdentityNotMatchingScreen}
        options={{ headerShown: false, gestureEnabled: false }}
      />
Severity: Major
Found in ts/features/itwallet/navigation/ItwStackNavigator.tsx and 5 other locations - About 35 mins to fix
ts/features/itwallet/navigation/ItwStackNavigator.tsx on lines 189..193
ts/features/messages/navigation/MessagesNavigator.tsx on lines 45..52
ts/features/messages/navigation/MessagesNavigator.tsx on lines 55..62
ts/features/messages/navigation/MessagesNavigator.tsx on lines 67..74
ts/features/payments/onboarding/navigation/navigator.tsx on lines 22..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 47.

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

    <Stack.Screen
      name={PaymentsCheckoutRoutes.PAYMENT_CHECKOUT_INPUT_FISCAL_CODE}
      component={WalletPaymentInputFiscalCodeScreen}
      options={{
        gestureEnabled: isGestureEnabled,
Severity: Major
Found in ts/features/payments/checkout/navigation/navigator.tsx and 5 other locations - About 35 mins to fix
ts/features/payments/checkout/navigation/navigator.tsx on lines 24..31
ts/features/payments/checkout/navigation/navigator.tsx on lines 49..56
ts/features/payments/checkout/navigation/navigator.tsx on lines 57..64
ts/features/payments/checkout/navigation/navigator.tsx on lines 65..72
ts/features/payments/details/navigation/navigator.tsx on lines 19..23

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

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

  it("should reject invalid CVCs", () => {
    invalidCVCs.forEach(d => expect(CreditCardCVC.is(d)).toBeFalsy());
  });
Severity: Major
Found in ts/utils/__tests__/input.test.ts and 4 other locations - About 35 mins to fix
ts/utils/__tests__/input.test.ts on lines 28..30
ts/utils/__tests__/input.test.ts on lines 57..59
ts/utils/__tests__/input.test.ts on lines 72..74
ts/utils/__tests__/input.test.ts on lines 198..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 47.

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

        <Stack.Screen
          name={MESSAGES_ROUTES.MESSAGE_DETAIL_CALENDAR}
          component={MessageCalendarScreen}
          options={{
            gestureEnabled: false,
Severity: Major
Found in ts/features/messages/navigation/MessagesNavigator.tsx and 5 other locations - About 35 mins to fix
ts/features/itwallet/navigation/ItwStackNavigator.tsx on lines 183..187
ts/features/itwallet/navigation/ItwStackNavigator.tsx on lines 189..193
ts/features/messages/navigation/MessagesNavigator.tsx on lines 45..52
ts/features/messages/navigation/MessagesNavigator.tsx on lines 55..62
ts/features/payments/onboarding/navigation/navigator.tsx on lines 22..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 47.

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

  it("should both trim spaces and limit the string to the maximum length", () => {
    const input = "a b c d e f g";
    const result = trimAndLimitValue(input, 5);
    expect(result).toBe("abcde");
  });
Severity: Major
Found in ts/features/payments/checkout/utils/__tests__/index.test.ts and 5 other locations - About 35 mins to fix
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 4..8
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 10..14
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 16..20
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 28..32
ts/features/payments/checkout/utils/__tests__/index.test.ts on lines 34..38

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

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

    const h3whiteBold = TestRenderer.create(
      <H3 color={"white"} weight={"Bold"}>
        Text
      </H3>
    ).toJSON();
Severity: Major
Found in ts/components/core/typography/__test__/typography.test.tsx and 5 other locations - About 35 mins to fix
ts/components/core/typography/__test__/typography.test.tsx on lines 80..84
ts/components/core/typography/__test__/typography.test.tsx on lines 87..91
ts/components/core/typography/__test__/typography.test.tsx on lines 94..98
ts/components/core/typography/__test__/typography.test.tsx on lines 124..128
ts/components/core/typography/__test__/typography.test.tsx on lines 130..134

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

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

        <Stack.Screen
          name={EUCOVIDCERT_ROUTES.MAIN}
          component={EUCovidCertStackNavigator}
          options={{
            gestureEnabled: false,
Severity: Major
Found in ts/features/messages/navigation/MessagesNavigator.tsx and 5 other locations - About 35 mins to fix
ts/features/itwallet/navigation/ItwStackNavigator.tsx on lines 183..187
ts/features/itwallet/navigation/ItwStackNavigator.tsx on lines 189..193
ts/features/messages/navigation/MessagesNavigator.tsx on lines 55..62
ts/features/messages/navigation/MessagesNavigator.tsx on lines 67..74
ts/features/payments/onboarding/navigation/navigator.tsx on lines 22..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 47.

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

    <Stack.Screen
      name={PaymentsCheckoutRoutes.PAYMENT_CHECKOUT_INPUT_NOTICE_NUMBER}
      component={WalletPaymentInputNoticeNumberScreen}
      options={{
        gestureEnabled: isGestureEnabled,
Severity: Major
Found in ts/features/payments/checkout/navigation/navigator.tsx and 5 other locations - About 35 mins to fix
ts/features/payments/checkout/navigation/navigator.tsx on lines 32..39
ts/features/payments/checkout/navigation/navigator.tsx on lines 49..56
ts/features/payments/checkout/navigation/navigator.tsx on lines 57..64
ts/features/payments/checkout/navigation/navigator.tsx on lines 65..72
ts/features/payments/details/navigation/navigator.tsx on lines 19..23

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

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

  const settingsAction: HeaderActionProps = useMemo(
    () => ({
      icon: "coggle",
      accessibilityLabel: I18n.t("global.buttons.settings"),
      onPress: navigateToSettingMainScreen
Severity: Major
Found in ts/navigation/components/HeaderFirstLevelHandler.tsx and 5 other locations - About 35 mins to fix
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 173..180
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 182..189
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 201..210
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 227..234
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 236..243

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

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

  const searchInstitutionAction: HeaderActionProps = useMemo(
    () => ({
      icon: "search",
      accessibilityLabel: I18n.t("global.accessibility.search"),
      onPress: handleSearchInstituion
Severity: Major
Found in ts/navigation/components/HeaderFirstLevelHandler.tsx and 5 other locations - About 35 mins to fix
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 164..171
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 173..180
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 182..189
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 201..210
ts/navigation/components/HeaderFirstLevelHandler.tsx on lines 227..234

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

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

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

        O.map(
          A.filter(
            method =>
              !recentPaymentMethodListItem.some(item => item.id === method.id)
          )
ts/features/payments/checkout/components/CheckoutPaymentMethodsList.tsx on lines 101..106

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

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

  it("should accept valid PANs", () => {
    validPANs.forEach(d => expect(CreditCardPan.is(d)).toBeTruthy());
  });
Severity: Major
Found in ts/utils/__tests__/input.test.ts and 4 other locations - About 35 mins to fix
ts/utils/__tests__/input.test.ts on lines 28..30
ts/utils/__tests__/input.test.ts on lines 72..74
ts/utils/__tests__/input.test.ts on lines 198..200
ts/utils/__tests__/input.test.ts on lines 210..212

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

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

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

        O.map(
          A.filter(
            method =>
              !recentPaymentMethodListItem.some(item => item.id === method.id)
          )
ts/features/payments/checkout/components/CheckoutPaymentMethodsList.tsx on lines 82..87

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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