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

  it("Should match snapshot, not cancelled, undefined paid notice code, empty payments", () => {
    const component = renderComponent(false, undefined, []);
    expect(component.toJSON()).toMatchSnapshot();
  });
ts/features/pn/components/__test__/MessageCancelledContent.test.tsx on lines 134..137

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

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

function ParamAuthorizationBearerHeaderProducer<
  P extends { readonly Bearer: string }
>(): RequestHeaderProducer<P, "Authorization"> {
  return (p: P): RequestHeaders<"Authorization"> => ({
    Authorization: `Bearer ${p.Bearer}`
Severity: Minor
Found in ts/features/bonus/cgn/api/backendCgn.ts and 1 other location - About 40 mins to fix
ts/utils/api.ts on lines 17..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 48.

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

Function commonPaymentVerificationProcedure has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  getVerificaRpt: ReturnType<typeof BackendClient>["getVerificaRpt"],
  rptId: RptId,
  successActionProvider: (paymentData: PaymentRequestsGetResponse) => A,
  failureActionProvider: (details: Detail_v2Enum) => A,
  action?: ActionType<(typeof paymentVerifica)["request"]>
Severity: Minor
Found in ts/sagas/wallet/pagopaApis.ts - About 35 mins to fix

    Function replaceVersionName has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function replaceVersionName(match, version, p1, p2, p3) {
    Severity: Minor
    Found in scripts/changelog/gradle_updater.js - About 35 mins to fix

      Function requestCieAuthPage has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def requestCieAuthPage(
      Severity: Minor
      Found in scripts/check_cie_button_exists/check_cie_button_exists_ios.py - About 35 mins to fix

        Function replacer has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function replacer(match, version, p1, p2, p3) {
        Severity: Minor
        Found in scripts/changelog/pbxproj_updater.js - About 35 mins to fix

          Function replaceReleaseDate has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function replaceReleaseDate(_, version, p1, p2, p3) {
          Severity: Minor
          Found in scripts/changelog/publiccode_updater.js - About 35 mins to fix

            Function getObjectWithMinAppVersion has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              backendStatus: O.Option<BackendStatus>,
              mainLocalFlag: boolean,
              configPropertyName: T,
              optionalLocalFlag?: boolean,
              optionalConfig?: ExtractSecondLevelKeyWithMinAppVersion<Config, T>
            Severity: Minor
            Found in ts/store/reducers/featureFlagWithMinAppVersionStatus.ts - About 35 mins to fix

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

                  const getTitleHeight = (event: LayoutChangeEvent) => {
                    const { height } = event.nativeEvent.layout;
                    setTitleHeight(height);
                  };
              Severity: Major
              Found in ts/components/ui/IOScrollViewWithLargeHeader.tsx and 4 other locations - About 35 mins to fix
              ts/components/ui/RNavScreenWithLargeHeader.tsx on lines 73..76
              ts/features/design-system/core/DSHeaderSecondLevelWithSectionTitle.tsx on lines 36..39
              ts/features/payments/bizEventsTransaction/screens/PaymentsTransactionBizEventsListScreen.tsx on lines 102..105
              ts/features/payments/transaction/screens/PaymentsTransactionListScreen.tsx on lines 82..85

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

                beforeEach(async () => {
                  await deactivateCGNCardIfNeeded();
                  await device.launchApp({ newInstance: true });
                  await ensureLoggedIn();
                });
              Severity: Minor
              Found in ts/features/bonus/cgn/__e2e__/cgn00.e2e.ts and 2 other locations - About 35 mins to fix
              ts/features/bonus/cgn/__e2e__/cgn01.e2e.ts on lines 7..11
              ts/features/bonus/cgn/__e2e__/cgn02.e2e.ts on lines 8..12

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

                const getTitleHeight = (event: LayoutChangeEvent) => {
                  const { height } = event.nativeEvent.layout;
                  setTitleHeight(height);
                };
              ts/components/ui/IOScrollViewWithLargeHeader.tsx on lines 80..83
              ts/components/ui/RNavScreenWithLargeHeader.tsx on lines 73..76
              ts/features/design-system/core/DSHeaderSecondLevelWithSectionTitle.tsx on lines 36..39
              ts/features/payments/transaction/screens/PaymentsTransactionListScreen.tsx on lines 82..85

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

                const getTitleHeight = (event: LayoutChangeEvent) => {
                  const { height } = event.nativeEvent.layout;
                  setTitleHeight(height);
                };
              ts/components/ui/IOScrollViewWithLargeHeader.tsx on lines 80..83
              ts/components/ui/RNavScreenWithLargeHeader.tsx on lines 73..76
              ts/features/design-system/core/DSHeaderSecondLevelWithSectionTitle.tsx on lines 36..39
              ts/features/payments/bizEventsTransaction/screens/PaymentsTransactionBizEventsListScreen.tsx on lines 102..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 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 5 locations. Consider refactoring.
              Open

                const getTitleHeight = (event: LayoutChangeEvent) => {
                  const { height } = event.nativeEvent.layout;
                  setTitleHeight(height);
                };
              Severity: Major
              Found in ts/components/ui/RNavScreenWithLargeHeader.tsx and 4 other locations - About 35 mins to fix
              ts/components/ui/IOScrollViewWithLargeHeader.tsx on lines 80..83
              ts/features/design-system/core/DSHeaderSecondLevelWithSectionTitle.tsx on lines 36..39
              ts/features/payments/bizEventsTransaction/screens/PaymentsTransactionBizEventsListScreen.tsx on lines 102..105
              ts/features/payments/transaction/screens/PaymentsTransactionListScreen.tsx on lines 82..85

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

                beforeEach(async () => {
                  await deactivateCGNCardIfNeeded();
                  await device.launchApp({ newInstance: true });
                  await ensureLoggedIn();
                });
              Severity: Minor
              Found in ts/features/bonus/cgn/__e2e__/cgn02.e2e.ts and 2 other locations - About 35 mins to fix
              ts/features/bonus/cgn/__e2e__/cgn00.e2e.ts on lines 8..12
              ts/features/bonus/cgn/__e2e__/cgn01.e2e.ts on lines 7..11

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

                        dispatch(
                          zendeskSupportStart({
                            faqCategories,
                            contextualHelp,
                            contextualHelpMarkdown,
              Severity: Minor
              Found in ts/components/screens/BaseScreenComponent/index.tsx and 2 other locations - About 35 mins to fix
              ts/features/barcode/components/BarcodeScanBaseScreenComponent.tsx on lines 155..165
              ts/hooks/useStartSupportRequest.ts on lines 39..49

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

                      dispatch(
                        zendeskSupportStart({
                          faqCategories,
                          contextualHelp,
                          contextualHelpMarkdown,
              Severity: Minor
              Found in ts/hooks/useStartSupportRequest.ts and 2 other locations - About 35 mins to fix
              ts/components/screens/BaseScreenComponent/index.tsx on lines 98..108
              ts/features/barcode/components/BarcodeScanBaseScreenComponent.tsx on lines 155..165

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

                        dispatch(
                          zendeskSupportStart({
                            faqCategories,
                            contextualHelp,
                            contextualHelpMarkdown,
              ts/components/screens/BaseScreenComponent/index.tsx on lines 98..108
              ts/hooks/useStartSupportRequest.ts on lines 39..49

              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.idPay.wallet.initiativesWithInstrument
                  ).toStrictEqual(
                    pot.someUpdating(
                      mockInitiativesWithInstrumentSuccess,
              ts/features/euCovidCert/store/reducers/__test__/byAuthCode.test.ts on lines 81..83
              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/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

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

                const getTitleHeight = (event: LayoutChangeEvent) => {
                  const { height } = event.nativeEvent.layout;
                  setTitleHeight(height);
                };
              ts/components/ui/IOScrollViewWithLargeHeader.tsx on lines 80..83
              ts/components/ui/RNavScreenWithLargeHeader.tsx on lines 73..76
              ts/features/payments/bizEventsTransaction/screens/PaymentsTransactionBizEventsListScreen.tsx on lines 102..105
              ts/features/payments/transaction/screens/PaymentsTransactionListScreen.tsx on lines 82..85

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

                beforeEach(async () => {
                  await deactivateCGNCardIfNeeded();
                  await device.launchApp({ newInstance: true });
                  await ensureLoggedIn();
                });
              Severity: Minor
              Found in ts/features/bonus/cgn/__e2e__/cgn01.e2e.ts and 2 other locations - About 35 mins to fix
              ts/features/bonus/cgn/__e2e__/cgn00.e2e.ts on lines 8..12
              ts/features/bonus/cgn/__e2e__/cgn02.e2e.ts on lines 8..12

              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