testokur/testokur-ui

View on GitHub

Showing 117 of 117 total issues

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

  const lineHeightMapping = curry<string>({
    PageTitle: () => theme.lineHeight.lineHeightHeadingDisplay,
    PageSubtitle: () => theme.lineHeight.lineHeightHeadingDisplaySubtitle,
    Title1: () => theme.lineHeight.lineHeightHeadingTitle1,
    Title2: () => theme.lineHeight.lineHeightHeadingTitle2,
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 16..24

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

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

describe('getColor', () => {
  it('should return colors', () => {
    const colors: string[] = [];
    Object.keys(Colors).forEach(x => colors.push(getColor(theme)(x)));
    expect(isArrayUnique(colors)).toBeTruthy();
Severity: Major
Found in src/modules/common/__tests__/index.test.ts and 2 other locations - About 4 hrs to fix
src/modules/common/__tests__/index.test.ts on lines 7..14
src/modules/common/__tests__/index.test.ts on lines 25..32

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

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

describe('getSize', () => {
  it('should return sizes', () => {
    const sizes: string[] = [];
    Object.keys(Sizes).forEach(x => sizes.push(getSize(theme)(x)));
    expect(isArrayUnique(sizes)).toBeTruthy();
Severity: Major
Found in src/modules/common/__tests__/index.test.ts and 2 other locations - About 4 hrs to fix
src/modules/common/__tests__/index.test.ts on lines 7..14
src/modules/common/__tests__/index.test.ts on lines 16..23

Duplicated Code

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

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

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

Tuning

This issue has a mass of 124.

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

describe('getSpacing', () => {
  it('should return spacing', () => {
    const spacings: string[] = [];
    Object.keys(SpacingsAfter).forEach(x => spacings.push(getSpacing(theme)(x)));
    expect(isArrayUnique(spacings)).toBeTruthy();
Severity: Major
Found in src/modules/common/__tests__/index.test.ts and 2 other locations - About 4 hrs to fix
src/modules/common/__tests__/index.test.ts on lines 16..23
src/modules/common/__tests__/index.test.ts on lines 25..32

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

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

describe('Button', () => {
  before(() => {
    cy.visitStorybook();
  });

Severity: Major
Found in cypress/integration/Button.ts and 2 other locations - About 4 hrs to fix
cypress/integration/Divider.ts on lines 1..16
cypress/integration/List.ts on lines 1..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 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 3 locations. Consider refactoring.
Open

describe('Divider', () => {
  before(() => {
    cy.visitStorybook();
  });

Severity: Major
Found in cypress/integration/Divider.ts and 2 other locations - About 4 hrs to fix
cypress/integration/Button.ts on lines 1..16
cypress/integration/List.ts on lines 1..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 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 3 locations. Consider refactoring.
Open

describe('List', () => {
  before(() => {
    cy.visitStorybook();
  });

Severity: Major
Found in cypress/integration/List.ts and 2 other locations - About 4 hrs to fix
cypress/integration/Button.ts on lines 1..16
cypress/integration/Divider.ts on lines 1..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 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 16 locations. Consider refactoring.
Open

  const backgroundButtonBorderedHoverMapping = curry<string>({
    Primary: () => theme.colors.backgroundButtonBorderedHover,
    Secondary: () => theme.colors.backgroundButtonBorderedHover,
    Success: () => theme.colors.backgroundButtonBorderedHover,
    Info: () => theme.colors.backgroundButtonBorderedHover,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const colorTextButtonMapping = curry<string>({
    Primary: () => theme.colors.colorTextButtonPrimary,
    Secondary: () => theme.colors.colorTextButtonSecondary,
    Success: () => theme.colors.colorTextButtonSuccess,
    Info: () => theme.colors.colorTextButtonInfo,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const colorTextButtonBorderedActiveMapping = curry<string>({
    Primary: () => theme.colors.colorTextButtonPrimaryBorderedActive,
    Secondary: () => theme.colors.colorTextButtonSecondaryBorderedActive,
    Success: () => theme.colors.colorTextButtonSuccessBorderedActive,
    Info: () => theme.colors.colorTextButtonInfoBorderedActive,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const backgroundButtonBorderedActiveMapping = curry<string>({
    Primary: () => theme.colors.backgroundButtonBorderedActive,
    Secondary: () => theme.colors.backgroundButtonBorderedActive,
    Success: () => theme.colors.backgroundButtonBorderedActive,
    Info: () => theme.colors.backgroundButtonBorderedActive,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const colorTextButtonBorderedMapping = curry<string>({
    Primary: () => theme.colors.colorTextButtonPrimaryBordered,
    Secondary: () => theme.colors.colorTextButtonSecondaryBordered,
    Success: () => theme.colors.colorTextButtonSuccessBordered,
    Info: () => theme.colors.colorTextButtonInfoBordered,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const borderColorButtonHoverMapping = curry<string>({
    Primary: () => theme.colors.borderColorButtonPrimaryBorderedHover,
    Secondary: () => theme.colors.borderColorButtonSecondaryBorderedHover,
    Success: () => theme.colors.borderColorButtonSuccessBorderedHover,
    Info: () => theme.colors.colorTextButtonInfoBorderedHover,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 141..148

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

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

  const colorTextButtonBorderedHoverMapping = curry<string>({
    Primary: () => theme.colors.colorTextButtonPrimaryBorderedHover,
    Secondary: () => theme.colors.colorTextButtonSecondaryBorderedHover,
    Success: () => theme.colors.colorTextButtonSuccessBorderedHover,
    Info: () => theme.colors.colorTextButtonInfoBorderedHover,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const backgroundButtonActiveMappings = curry<string>({
    Primary: () => theme.colors.backgroundButtonPrimaryActive,
    Secondary: () => theme.colors.backgroundButtonSecondaryActive,
    Success: () => theme.colors.backgroundButtonSuccessActive,
    Info: () => theme.colors.backgroundButtonInfoActive,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const backgroundButtonHoverMappings = curry<string>({
    Primary: () => theme.colors.backgroundButtonPrimaryHover,
    Secondary: () => theme.colors.backgroundButtonSecondaryHover,
    Success: () => theme.colors.backgroundButtonSuccessHover,
    Info: () => theme.colors.backgroundButtonInfoHover,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const colorTextButtonActiveMapping = curry<string>({
    Primary: () => theme.colors.colorTextButtonPrimaryActive,
    Secondary: () => theme.colors.colorTextButtonSecondaryActive,
    Success: () => theme.colors.colorTextButtonSuccessActive,
    Info: () => theme.colors.colorTextButtonInfoActive,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const backgroundButtonFocusMappings = curry<string>({
    Primary: () => theme.colors.backgroundButtonPrimary,
    Secondary: () => theme.colors.backgroundButtonSecondary,
    Success: () => theme.colors.backgroundButtonSuccess,
    Info: () => theme.colors.backgroundButtonInfo,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const backgroundButtonBorderedMapping = curry<string>({
    Primary: () => theme.colors.backgroundButtonBordered,
    Secondary: () => theme.colors.backgroundButtonBordered,
    Success: () => theme.colors.backgroundButtonBordered,
    Info: () => theme.colors.backgroundButtonBordered,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139
src/components/Button/getColor.ts on lines 141..148

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

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

  const borderColorButtonActiveMapping = curry<string>({
    Primary: () => theme.colors.borderColorButtonPrimaryBorderedActive,
    Secondary: () => theme.colors.borderColorButtonSecondaryBorderedActive,
    Success: () => theme.colors.borderColorButtonSuccessBorderedActive,
    Info: () => theme.colors.colorTextButtonInfoBorderedActive,
Severity: Major
Found in src/components/Button/getColor.ts and 15 other locations - About 3 hrs to fix
src/components/Button/getColor.ts on lines 6..13
src/components/Button/getColor.ts on lines 15..22
src/components/Button/getColor.ts on lines 24..31
src/components/Button/getColor.ts on lines 33..40
src/components/Button/getColor.ts on lines 42..49
src/components/Button/getColor.ts on lines 51..58
src/components/Button/getColor.ts on lines 60..67
src/components/Button/getColor.ts on lines 69..76
src/components/Button/getColor.ts on lines 78..85
src/components/Button/getColor.ts on lines 87..94
src/components/Button/getColor.ts on lines 96..103
src/components/Button/getColor.ts on lines 105..112
src/components/Button/getColor.ts on lines 114..121
src/components/Button/getColor.ts on lines 123..130
src/components/Button/getColor.ts on lines 132..139

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

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