teamdigitale/italia-app

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

Summary

Maintainability
F
1 wk
Test Coverage

File DSButtons.tsx has 796 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  ButtonLink,
  ButtonOutline,
  ButtonSolid,
  H4,
Severity: Major
Found in ts/features/design-system/core/DSButtons.tsx - About 1 day to fix

    Function DSButtons has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const DSButtons = () => {
      const { isExperimental } = useIOExperimentalDesign();
      const theme = useIOTheme();
    
      return (
    Severity: Minor
    Found in ts/features/design-system/core/DSButtons.tsx - About 1 hr to fix

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

          <DSComponentViewerBox name="ButtonSolid · Primary variant">
            <VStack space={buttonBlockInnerSpacing}>
              <ButtonSolid
                accessibilityLabel="Tap to trigger test alert"
                label={"Primary button"}
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 2 other locations - About 7 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 316..347
      ts/features/design-system/core/DSButtons.tsx on lines 521..552

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

      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="ButtonLink · Primary variant">
            <VStack space={buttonBlockInnerSpacingLoose}>
              <ButtonLink
                accessibilityLabel="Tap to trigger test alert"
                label={"Primary button"}
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 2 other locations - About 7 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 90..118
      ts/features/design-system/core/DSButtons.tsx on lines 316..347

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

      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="ButtonOutline · Primary variant">
            <VStack space={buttonBlockInnerSpacing}>
              <ButtonOutline
                accessibilityLabel="Tap to trigger test alert"
                label={"Primary button"}
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 2 other locations - About 7 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 90..118
      ts/features/design-system/core/DSButtons.tsx on lines 521..552

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

      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="ButtonSolid · Contrast variant"
                colorMode="dark"
              >
                <VStack space={buttonBlockInnerSpacing}>
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 5 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 447..476

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

      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="ButtonOutline · Contrast variant"
                colorMode="dark"
              >
                <VStack space={buttonBlockInnerSpacing}>
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 5 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 221..250

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

      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

          <View
            style={isExperimental ? styles.primaryBlock : styles.primaryBlockLegacy}
          >
            <DSComponentViewerBox
              name="IconButtonContained · Contrast variant"
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 5 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 750..774

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

      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

          <View
            style={isExperimental ? styles.primaryBlock : styles.primaryBlockLegacy}
          >
            <DSComponentViewerBox
              name="IconButtonSolid · Contrast variant, large"
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 5 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 814..838

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

      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="IconButton · Contrast variant"
              colorMode="dark"
            >
              <HStack space={buttonBlockInnerSpacingLoose}>
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 4 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 670..694

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

      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="IconButton · Neutral variant">
            <HStack space={buttonBlockInnerSpacingLoose}>
              <IconButton
                color="neutral"
                accessibilityLabel="Tap to trigger test alert"
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 4 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 698..725

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

      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="ButtonOutline · Primary, disabled">
            <VStack space={buttonBlockInnerSpacing}>
              <ButtonOutline
                disabled
                accessibilityLabel="Tap to trigger test alert"
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 3 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 553..571

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

      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="ButtonLink · Primary, disabled">
            <VStack space={buttonBlockInnerSpacingLoose}>
              <ButtonLink
                disabled
                accessibilityLabel="Tap to trigger test alert"
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 3 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 356..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 107.

      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="IconButtonContained · Neutral variant">
            <HStack space={buttonBlockInnerSpacing}>
              <IconButtonContained
                color="neutral"
                accessibilityLabel="Tap to trigger test alert"
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 3 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 732..749

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

      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="IconButtonSolid · Primary variant, large">
            <HStack space={buttonBlockInnerSpacingLoose}>
              <IconButtonSolid
                color="primary"
                accessibilityLabel="Tap to trigger test alert"
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 3 hrs to fix
      ts/features/design-system/core/DSButtons.tsx on lines 796..813

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

      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="ButtonOutline · Contrast, full width"
                colorMode="dark"
              >
                <ButtonOutline
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSButtons.tsx on lines 252..263

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

      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="ButtonSolid · Contrast, full width"
                colorMode="dark"
              >
                <ButtonSolid
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 1 hr to fix
      ts/features/design-system/core/DSButtons.tsx on lines 478..489

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

      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

              <VStack space={sectionTitleMargin}>
                <H4 color={theme["textHeading-default"]}>ButtonOutline</H4>
                {renderButtonOutline(isExperimental)}
              </VStack>
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 5 other locations - About 50 mins to fix
      ts/features/design-system/core/DSButtons.tsx on lines 52..55
      ts/features/design-system/core/DSButtons.tsx on lines 62..65
      ts/features/design-system/core/DSButtons.tsx on lines 67..70
      ts/features/design-system/core/DSButtons.tsx on lines 72..75
      ts/features/design-system/core/DSButtons.tsx on lines 77..82

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

      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

              <VStack space={sectionTitleMargin}>
                <H4 color={theme["textHeading-default"]}>ButtonLink</H4>
                {renderButtonLink(isExperimental)}
              </VStack>
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 5 other locations - About 50 mins to fix
      ts/features/design-system/core/DSButtons.tsx on lines 52..55
      ts/features/design-system/core/DSButtons.tsx on lines 57..60
      ts/features/design-system/core/DSButtons.tsx on lines 67..70
      ts/features/design-system/core/DSButtons.tsx on lines 72..75
      ts/features/design-system/core/DSButtons.tsx on lines 77..82

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

      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

              <VStack space={sectionTitleMargin}>
                <H4 color={theme["textHeading-default"]}>IconButton</H4>
                {renderIconButton(isExperimental)}
              </VStack>
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 5 other locations - About 50 mins to fix
      ts/features/design-system/core/DSButtons.tsx on lines 52..55
      ts/features/design-system/core/DSButtons.tsx on lines 57..60
      ts/features/design-system/core/DSButtons.tsx on lines 62..65
      ts/features/design-system/core/DSButtons.tsx on lines 72..75
      ts/features/design-system/core/DSButtons.tsx on lines 77..82

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

      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

              <VStack space={sectionTitleMargin}>
                <H4 color={theme["textHeading-default"]}>ButtonSolid</H4>
                {renderButtonSolid(isExperimental)}
              </VStack>
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 5 other locations - About 50 mins to fix
      ts/features/design-system/core/DSButtons.tsx on lines 57..60
      ts/features/design-system/core/DSButtons.tsx on lines 62..65
      ts/features/design-system/core/DSButtons.tsx on lines 67..70
      ts/features/design-system/core/DSButtons.tsx on lines 72..75
      ts/features/design-system/core/DSButtons.tsx on lines 77..82

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

      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

              <VStack space={sectionTitleMargin}>
                <H4 color={theme["textHeading-default"]}>
                  IconButtonContained (Icebox)
                </H4>
                {renderIconButtonContained(isExperimental)}
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 5 other locations - About 50 mins to fix
      ts/features/design-system/core/DSButtons.tsx on lines 52..55
      ts/features/design-system/core/DSButtons.tsx on lines 57..60
      ts/features/design-system/core/DSButtons.tsx on lines 62..65
      ts/features/design-system/core/DSButtons.tsx on lines 67..70
      ts/features/design-system/core/DSButtons.tsx on lines 72..75

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

      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

              <VStack space={sectionTitleMargin}>
                <H4 color={theme["textHeading-default"]}>IconButtonSolid</H4>
                {renderIconButtonSolid(isExperimental)}
              </VStack>
      Severity: Major
      Found in ts/features/design-system/core/DSButtons.tsx and 5 other locations - About 50 mins to fix
      ts/features/design-system/core/DSButtons.tsx on lines 52..55
      ts/features/design-system/core/DSButtons.tsx on lines 57..60
      ts/features/design-system/core/DSButtons.tsx on lines 62..65
      ts/features/design-system/core/DSButtons.tsx on lines 67..70
      ts/features/design-system/core/DSButtons.tsx on lines 77..82

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

      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="ButtonSolid · Primary, full width">
            <ButtonSolid
              fullWidth
              accessibilityLabel="Tap to trigger test alert"
              label={"Primary button (full width)"}
      Severity: Minor
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 35 mins to fix
      ts/features/design-system/core/DSButtons.tsx on lines 348..355

      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="ButtonOutline · Primary, full width">
            <ButtonOutline
              fullWidth
              accessibilityLabel="Tap to trigger test alert"
              label={"Primary button (full width)"}
      Severity: Minor
      Found in ts/features/design-system/core/DSButtons.tsx and 1 other location - About 35 mins to fix
      ts/features/design-system/core/DSButtons.tsx on lines 119..126

      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

      There are no issues that match your filters.

      Category
      Status