teamdigitale/italia-app

View on GitHub

Showing 4,862 of 4,862 total issues

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

export function trackWalletCredentialShowAuthSource(
  credential: MixPanelCredential
) {
  void mixpanelTrack(
    ITW_ACTIONS_EVENTS.ITW_CREDENTIAL_SHOW_AUTH_SOURCE,
Severity: Minor
Found in ts/features/itwallet/analytics/index.ts and 1 other location - About 35 mins to fix
ts/features/itwallet/analytics/index.ts on lines 422..429

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

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

    await waitFor(element(by.text(I18n.t("wallet.methods.card.name"))))
      .toBeVisible()
      .withTimeout(e2eWaitRenderTimeout);
ts/features/wallet/onboarding/__e2e__/creditCardOnboarding.e2e.ts on lines 12..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

      if (getZendeskConfigResult.right.status === 200) {
        yield* put(
          getZendeskConfig.success(getZendeskConfigResult.right.value)
        );
      } else {
Severity: Minor
Found in ts/features/zendesk/saga/networking/handleGetZendeskConfig.ts and 1 other location - About 35 mins to fix
ts/sagas/wallet/pagopaApis.ts on lines 869..889

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

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 type LoggedOutWithIdp = Readonly<{
  kind: "LoggedOutWithIdp";
  idp: SpidIdp;
  reason: LoggedOutReason;
}>;
Severity: Minor
Found in ts/store/reducers/authentication.ts and 1 other location - About 35 mins to fix
ts/store/reducers/authentication.ts on lines 48..52

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

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

Avoid too many return statements within this function.
Open

  return E.right(card);
Severity: Major
Found in ts/utils/input.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return;
    Severity: Major
    Found in ts/sagas/startup.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        return FOUR_UNICODE_CIRCLES;
      Severity: Major
      Found in ts/utils/paymentMethod.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return "Timeout - " + str(e)
        Severity: Major
        Found in scripts/check_urls/check_urls.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            return cardIcons.UNKNOWN;
          Severity: Major
          Found in ts/utils/paymentMethod.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return "General Error - " + str(e)
            Severity: Major
            Found in scripts/check_urls/check_urls.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                return undefined;
              Severity: Major
              Found in ts/utils/walletv2.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return str(e)
                Severity: Major
                Found in scripts/check_urls/check_urls.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return E.left(
                        I18n.t("wallet.dummyCard.accessibility.button.fieldError", {
                          field: I18n.t(
                            detectedBrand.cvvLength === 4
                              ? "wallet.dummyCard.labels.securityCode4D"
                  Severity: Major
                  Found in ts/utils/input.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          return;
                    Severity: Major
                    Found in ts/sagas/startup.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return;
                      Severity: Major
                      Found in ts/sagas/startup.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            return;
                        Severity: Major
                        Found in ts/sagas/startup.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                return;
                          Severity: Major
                          Found in ts/screens/authentication/analytics/spidAnalytics.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return true;
                            Severity: Major
                            Found in ts/components/cie/CieRequestAuthenticationOverlay.tsx - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                return <IdentificationModal />;
                              Severity: Major
                              Found in ts/screens/modal/RootModal.tsx - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return <GetProfileEndpointTransientError />;
                                Severity: Major
                                Found in ts/screens/modal/RootModal.tsx - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language