testokur/testokur-ui

View on GitHub

Showing 117 of 117 total issues

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

    ${(props): FlattenSimpleInterpolation | undefined =>
    !props.disabled
      ? css`
            background: ${props.bordered
    ? getColor(Tokens.backgroundButtonBorderedHover, props.buttonType, props.theme)
Severity: Major
Found in src/components/Button/styled.ts and 1 other location - About 1 day to fix
src/components/Button/styled.ts on lines 128..144

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

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

    ${(props): FlattenSimpleInterpolation | undefined =>
    !props.disabled
      ? css`
            background: ${props.bordered
    ? getColor(Tokens.backgroundButtonBorderedActive, props.buttonType, props.theme)
Severity: Major
Found in src/components/Button/styled.ts and 1 other location - About 1 day to fix
src/components/Button/styled.ts on lines 108..124

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

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

  const backgroundMapping = curry<string>({
    Neutral: () => theme.palette.cloudLight,
    Info: () => theme.palette.blueLight,
    Success: () => theme.palette.greenLight,
    Warning: () => theme.palette.orangeLight,
Severity: Major
Found in src/components/Badge/getColor.ts and 1 other location - About 7 hrs to fix
src/components/Badge/getColor.ts on lines 19..31

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

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

  const colorMapping = curry<string>({
    Neutral: () => theme.palette.inkNormal,
    Info: () => theme.palette.blueDark,
    Success: () => theme.palette.greenDark,
    Warning: () => theme.palette.orangeDark,
Severity: Major
Found in src/components/Badge/getColor.ts and 1 other location - About 7 hrs to fix
src/components/Badge/getColor.ts on lines 5..17

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

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 getColor has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getColor = (name: string, type: Types, theme: TestOkurTheme): string => {
  const backgroundButtonMappings = curry<string>({
    Primary: () => theme.colors.backgroundButtonPrimary,
    Secondary: () => theme.colors.backgroundButtonSecondary,
    Success: () => theme.colors.backgroundButtonSuccess,
Severity: Major
Found in src/components/Button/getColor.ts - About 6 hrs to fix

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

    const Expired = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/Expired.tsx and 1 other location - About 6 hrs to fix
    src/components/Icons/Time.tsx on lines 5..17

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

    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

    const Time = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/Time.tsx and 1 other location - About 6 hrs to fix
    src/components/Icons/Expired.tsx on lines 5..17

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

    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

    describe('MaskedInputField', () => {
      before(() => {
        cy.visitStorybook();
      });
    
    
    Severity: Major
    Found in cypress/integration/MaskedInputField.ts and 1 other location - About 6 hrs to fix
    cypress/integration/Select.ts on lines 1..20

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

    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

    describe('Select', () => {
      before(() => {
        cy.visitStorybook();
      });
    
    
    Severity: Major
    Found in cypress/integration/Select.ts and 1 other location - About 6 hrs to fix
    cypress/integration/MaskedInputField.ts on lines 1..20

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

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

    const Check = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/Check.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Remove.tsx on lines 5..21
    src/components/Icons/Search.tsx on lines 5..16

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

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

    const Remove = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/Remove.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Search.tsx on lines 5..16

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

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

    const ChevronDown = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/ChevronDown.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Remove.tsx on lines 5..21
    src/components/Icons/Search.tsx on lines 5..16

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

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

    const ChevronLeft = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/ChevronLeft.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Remove.tsx on lines 5..21
    src/components/Icons/Search.tsx on lines 5..16

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

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

    const PlusCircle = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/PlusCircle.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/Remove.tsx on lines 5..21
    src/components/Icons/Search.tsx on lines 5..16

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

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

    const Cancelled = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/Cancelled.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Remove.tsx on lines 5..21
    src/components/Icons/Search.tsx on lines 5..16

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

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

    const Email = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/Email.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Remove.tsx on lines 5..21
    src/components/Icons/Search.tsx on lines 5..16

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

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

    const Search = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/Search.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Remove.tsx on lines 5..21

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

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

    const ChevronRight = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/ChevronRight.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/AccountCircle.tsx on lines 5..19
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Remove.tsx on lines 5..21
    src/components/Icons/Search.tsx on lines 5..16

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

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

    const AccountCircle = (props: Omit<Props, 'children'>): JSX.Element => {
      const { size, color, ariaHidden, ariaLabel, customColor } = props;
    
      return (
        <Component size={size} color={color} viewBox="0 0 24 24" ariaHidden={ariaHidden} ariaLabel={ariaLabel} customColor={customColor}>
    Severity: Major
    Found in src/components/Icons/AccountCircle.tsx and 9 other locations - About 5 hrs to fix
    src/components/Icons/Cancelled.tsx on lines 5..18
    src/components/Icons/Check.tsx on lines 5..16
    src/components/Icons/ChevronDown.tsx on lines 5..16
    src/components/Icons/ChevronLeft.tsx on lines 5..16
    src/components/Icons/ChevronRight.tsx on lines 5..16
    src/components/Icons/Email.tsx on lines 5..21
    src/components/Icons/PlusCircle.tsx on lines 5..18
    src/components/Icons/Remove.tsx on lines 5..21
    src/components/Icons/Search.tsx on lines 5..16

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

    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

      const sizeHeadingMapping = curry<string>({
        PageTitle: () => theme.font.fontSizeHeadingDisplay,
        PageSubtitle: () => theme.font.fontSizeHeadingDisplaySubtitle,
        Title1: () => theme.font.fontSizeHeadingTitle1,
        Title2: () => theme.font.fontSizeHeadingTitle2,
    Severity: Major
    Found in src/components/Heading/getHeadingToken.ts and 1 other location - About 4 hrs to fix
    src/components/Heading/getHeadingToken.ts on lines 26..34

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

    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