teamdigitale/italia-app

View on GitHub
ts/features/design-system/core/DSModules.tsx

Summary

Maintainability
D
2 days
Test Coverage

File DSModules.tsx has 391 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  H4,
  ModuleAttachment,
  ModuleCheckout,
  ModuleCredential,
Severity: Minor
Found in ts/features/design-system/core/DSModules.tsx - About 5 hrs to fix

    Function DSModules has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const DSModules = () => {
      const theme = useIOTheme();
      return (
        <DesignSystemScreen title="Modules">
          <VStack space={sectionMargin}>
    Severity: Minor
    Found in ts/features/design-system/core/DSModules.tsx - About 1 hr to fix

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

          <DSComponentViewerBox name="ModuleNavigation, with Badge">
            <ModuleNavigation
              icon="spid"
              title="SPID"
              subtitle="Usa credenziali e app (o SMS)"
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSModules.tsx on lines 396..408

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

      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

          <DSComponentViewerBox name="ModuleNavigation, with Badge, stress test">
            <ModuleNavigation
              icon="spid"
              title="Testo relativo allo SPID davvero molto lungo"
              subtitle="Usa credenziali e app (o SMS), ma anche qui il testo è molto lungo"
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSModules.tsx on lines 383..395

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

      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

          <DSComponentViewerBox name="ModuleCredential, with long label">
            <ModuleCredential
              icon="fingerprint"
              label="This is a very long long long label"
              onPress={onButtonPress}
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSModules.tsx on lines 319..329

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

      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

          <DSComponentViewerBox name="ModuleCredential, with Badge">
            <ModuleCredential
              icon="fingerprint"
              label="Identità digitale"
              onPress={onButtonPress}
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSModules.tsx on lines 330..340

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

      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

          <DSComponentViewerBox name="ModulePaymentNotice, loading">
            <ModulePaymentNotice
              title="Codice avviso"
              subtitle="9999 9999 9999 9999 99"
              paymentNoticeStatus="default"
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSListItems.tsx on lines 441..450

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

      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

          <DSComponentViewerBox name="ModuleCheckout, default, with image">
            <ModuleCheckout
              image={{
                uri: "https://assets.cdn.platform.pagopa.it/apm/bancomatpay.png"
              }}
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSModules.tsx on lines 220..229

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

      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

          <DSComponentViewerBox name="ModuleCheckout, no CTA, with image">
            <ModuleCheckout
              image={{
                uri: "https://assets.cdn.platform.pagopa.it/apm/bancomatpay.png"
              }}
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSModules.tsx on lines 194..203

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

      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

          <DSComponentViewerBox name="ModulePaymentNotice, default with amount">
            <ModulePaymentNotice
              title="Codice avviso"
              subtitle="9999 9999 9999 9999 99"
              paymentNoticeStatus="default"
      Severity: Minor
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 50 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 185..193

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

      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

          <DSComponentViewerBox name="ModuleCheckout, default">
            <ModuleCheckout
              paymentLogo="amex"
              title="Amex"
              subtitle="arien_c********@**hoo.it"
      Severity: Minor
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 50 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 144..152

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

      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

          <DSComponentViewerBox name="ModuleAttachment, loading">
            <ModuleAttachment
              title="Nome del documento.pdf"
              format="pdf"
              isLoading={true}
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 2 other locations - About 40 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 113..120
      ts/features/design-system/core/DSModules.tsx on lines 121..128

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

      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

          <DSComponentViewerBox name="ModuleAttachment, fetching">
            <ModuleAttachment
              title="Nome del documento.pdf"
              format="pdf"
              isFetching={true}
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 2 other locations - About 40 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 89..96
      ts/features/design-system/core/DSModules.tsx on lines 121..128

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

      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

          <DSComponentViewerBox name="ModuleAttachment, disabled">
            <ModuleAttachment
              title="Nome del documento.pdf"
              format="pdf"
              disabled={true}
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 2 other locations - About 40 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 89..96
      ts/features/design-system/core/DSModules.tsx on lines 113..120

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

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

          <DSComponentViewerBox name="ModuleCheckout, no description">
            <ModuleCheckout
              paymentLogo="amex"
              title="Amex"
              ctaText="Modifica"
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 3 other locations - About 35 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 169..176
      ts/features/design-system/core/DSModules.tsx on lines 212..219
      ts/features/design-system/core/DSModules.tsx on lines 367..374

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

          <DSComponentViewerBox name="ModuleNavigation">
            <ModuleNavigation
              icon="spid"
              title="SPID"
              subtitle="Usa credenziali e app (o SMS)"
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 3 other locations - About 35 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 169..176
      ts/features/design-system/core/DSModules.tsx on lines 204..211
      ts/features/design-system/core/DSModules.tsx on lines 212..219

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

          <DSComponentViewerBox name="ModulePaymentNotice, default, without title">
            <ModulePaymentNotice
              subtitle="TARI 2023 - Rata 01"
              paymentNoticeStatus="default"
              paymentNoticeAmount="1.000,00 €"
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 3 other locations - About 35 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 204..211
      ts/features/design-system/core/DSModules.tsx on lines 212..219
      ts/features/design-system/core/DSModules.tsx on lines 367..374

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

          <DSComponentViewerBox name="ModuleCheckout, no icon">
            <ModuleCheckout
              title="3,50 $"
              subtitle="Piú o meno"
              ctaText="Modifica"
      Severity: Major
      Found in ts/features/design-system/core/DSModules.tsx and 3 other locations - About 35 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 169..176
      ts/features/design-system/core/DSModules.tsx on lines 204..211
      ts/features/design-system/core/DSModules.tsx on lines 367..374

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

          <DSComponentViewerBox name="ModuleSummary, default variant">
            <ModuleSummary
              label={"Label name"}
              description={"This is a description of the element"}
              onPress={onButtonPress}
      Severity: Minor
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 35 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 256..262

      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

          <DSComponentViewerBox name="ModuleSummary, stress test">
            <ModuleSummary
              label={"A very looong loooooooong looooooooooooooong label"}
              description={"This is a very looooooong description of the element"}
              onPress={onButtonPress}
      Severity: Minor
      Found in ts/features/design-system/core/DSModules.tsx and 1 other location - About 35 mins to fix
      ts/features/design-system/core/DSModules.tsx on lines 242..248

      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

      There are no issues that match your filters.

      Category
      Status