grommet/grommet

View on GitHub

Showing 1,553 of 2,098 total issues

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

    const { container } = render(
      <Grommet>
        <RangeSelector values={[20, 30]} />
      </Grommet>,
    );
Severity: Minor
Found in src/js/components/RangeSelector/__tests__/RangeSelector-test.js and 1 other location - About 35 mins to fix
src/js/components/RangeSelector/__tests__/RangeSelector-test.js on lines 26..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    expect(onSubmit).toBeCalledWith(
      expect.objectContaining({
        value: { test: 'v' },
        touched: { test: true },
      }),
Severity: Major
Found in src/js/components/Form/__tests__/Form-test-uncontrolled.js and 5 other locations - About 35 mins to fix
src/js/components/Form/__tests__/Form-test-controlled.js on lines 47..52
src/js/components/Form/__tests__/Form-test-controlled.js on lines 225..230
src/js/components/Form/__tests__/Form-test-controlled.js on lines 267..272
src/js/components/Form/__tests__/Form-test-controlled.js on lines 310..315
src/js/components/Form/__tests__/Form-test-controlled.js on lines 371..376

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const { getByPlaceholderText, getByText, container } = render(
      <Grommet>
        <Test />
      </Grommet>,
    );
Severity: Major
Found in src/js/components/Form/__tests__/Form-test-controlled.js and 15 other locations - About 35 mins to fix
src/js/components/Form/__tests__/Form-test-controlled.js on lines 36..40
src/js/components/Form/__tests__/Form-test-controlled.js on lines 214..218
src/js/components/Form/__tests__/Form-test-controlled.js on lines 256..260
src/js/components/Form/__tests__/Form-test-controlled.js on lines 362..366
src/js/components/Form/__tests__/Form-test-controlled.js on lines 486..490
src/js/components/Form/__tests__/Form-test-controlled.js on lines 592..596
src/js/components/Form/__tests__/Form-test-controlled.js on lines 731..735
src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 1404..1408
src/js/components/Select/__tests__/Select-multiple-test.js on lines 246..250
src/js/components/Select/__tests__/Select-multiple-test.js on lines 316..320
src/js/components/Select/__tests__/Select-multiple-test.js on lines 387..391
src/js/components/Select/__tests__/Select-multiple-test.js on lines 436..440
src/js/components/Select/__tests__/Select-multiple-test.js on lines 476..480
src/js/components/Select/__tests__/Select-test.js on lines 329..333
src/js/components/Select/__tests__/Select-test.js on lines 471..475

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  const onCheckAll = (event) =>
    setChecked(event.target.checked ? DATA.map((datum) => datum.name) : []);
Severity: Minor
Found in src/js/components/DataTable/stories/rowDetails.js and 1 other location - About 35 mins to fix
src/js/components/DataTable/stories/Controlled.js on lines 26..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const { container: trapped } = render(
      <div id="focus-trap-test">
        <input id="test" />
      </div>,
    );
Severity: Minor
Found in src/js/components/__tests__/FocusedContainer-test.js and 1 other location - About 35 mins to fix
src/js/components/__tests__/FocusedContainer-test.js on lines 10..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const { getByPlaceholderText, getByText, container } = render(
      <Grommet>
        <Test />
      </Grommet>,
    );
Severity: Major
Found in src/js/components/Form/__tests__/Form-test-controlled.js and 15 other locations - About 35 mins to fix
src/js/components/Form/__tests__/Form-test-controlled.js on lines 36..40
src/js/components/Form/__tests__/Form-test-controlled.js on lines 256..260
src/js/components/Form/__tests__/Form-test-controlled.js on lines 299..303
src/js/components/Form/__tests__/Form-test-controlled.js on lines 362..366
src/js/components/Form/__tests__/Form-test-controlled.js on lines 486..490
src/js/components/Form/__tests__/Form-test-controlled.js on lines 592..596
src/js/components/Form/__tests__/Form-test-controlled.js on lines 731..735
src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 1404..1408
src/js/components/Select/__tests__/Select-multiple-test.js on lines 246..250
src/js/components/Select/__tests__/Select-multiple-test.js on lines 316..320
src/js/components/Select/__tests__/Select-multiple-test.js on lines 387..391
src/js/components/Select/__tests__/Select-multiple-test.js on lines 436..440
src/js/components/Select/__tests__/Select-multiple-test.js on lines 476..480
src/js/components/Select/__tests__/Select-test.js on lines 329..333
src/js/components/Select/__tests__/Select-test.js on lines 471..475

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  const onCheckAll = (event) =>
    setChecked(event.target.checked ? DATA.map((datum) => datum.name) : []);
Severity: Minor
Found in src/js/components/DataTable/stories/Controlled.js and 1 other location - About 35 mins to fix
src/js/components/DataTable/stories/rowDetails.js on lines 26..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const { container: trapped } = render(
      <div id="focus-trap-test">
        <input id="test" />
      </div>,
    );
Severity: Minor
Found in src/js/components/__tests__/FocusedContainer-test.js and 1 other location - About 35 mins to fix
src/js/components/__tests__/FocusedContainer-test.js on lines 49..53

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    expect(onSubmit).toBeCalledWith(
      expect.objectContaining({
        value: { test: 'v' },
        touched: { test: true },
      }),
Severity: Major
Found in src/js/components/Form/__tests__/Form-test-controlled.js and 5 other locations - About 35 mins to fix
src/js/components/Form/__tests__/Form-test-controlled.js on lines 47..52
src/js/components/Form/__tests__/Form-test-controlled.js on lines 225..230
src/js/components/Form/__tests__/Form-test-controlled.js on lines 267..272
src/js/components/Form/__tests__/Form-test-controlled.js on lines 371..376
src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 181..186

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const { getByLabelText, getByText, container } = render(
      <Grommet>
        <Test />
      </Grommet>,
    );
Severity: Major
Found in src/js/components/Form/__tests__/Form-test-controlled.js and 15 other locations - About 35 mins to fix
src/js/components/Form/__tests__/Form-test-controlled.js on lines 36..40
src/js/components/Form/__tests__/Form-test-controlled.js on lines 214..218
src/js/components/Form/__tests__/Form-test-controlled.js on lines 256..260
src/js/components/Form/__tests__/Form-test-controlled.js on lines 299..303
src/js/components/Form/__tests__/Form-test-controlled.js on lines 486..490
src/js/components/Form/__tests__/Form-test-controlled.js on lines 592..596
src/js/components/Form/__tests__/Form-test-controlled.js on lines 731..735
src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 1404..1408
src/js/components/Select/__tests__/Select-multiple-test.js on lines 246..250
src/js/components/Select/__tests__/Select-multiple-test.js on lines 316..320
src/js/components/Select/__tests__/Select-multiple-test.js on lines 387..391
src/js/components/Select/__tests__/Select-multiple-test.js on lines 436..440
src/js/components/Select/__tests__/Select-multiple-test.js on lines 476..480
src/js/components/Select/__tests__/Select-test.js on lines 329..333
src/js/components/Select/__tests__/Select-test.js on lines 471..475

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const { container } = render(
      <Grommet>
        <RangeSelector values={[20, 30]} />
      </Grommet>,
    );
Severity: Minor
Found in src/js/components/RangeSelector/__tests__/RangeSelector-test.js and 1 other location - About 35 mins to fix
src/js/components/RangeSelector/__tests__/RangeSelector-test.js on lines 13..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 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      <StyledText
        as={!as && tag ? tag : as}
        colorProp={color}
        aria-label={a11yTitle}
        truncate={truncate}
Severity: Minor
Found in src/js/components/Text/Text.js and 1 other location - About 35 mins to fix
src/js/components/Paragraph/Paragraph.js on lines 22..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 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                if (onChange) {
                  event.persist(); // extract from React synthetic event pool
                  const adjustedEvent = event;
                  adjustedEvent.value = validatedNextValue;
                  onChange(adjustedEvent);
Severity: Minor
Found in src/js/components/DateInput/DateInput.js and 1 other location - About 35 mins to fix
src/js/components/Form/Form.js on lines 698..703

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const onClickCopy = () => {
      global.navigator.clipboard.writeText(textValue);
      announce(readOnlyCopyValidation, 'assertive');
      setTip(readOnlyCopyValidation);
    };
Severity: Minor
Found in src/js/components/DateInput/DateInput.js and 1 other location - About 35 mins to fix
src/js/components/TextInput/TextInput.js on lines 147..151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          if (onReset) {
            event.persist(); // extract from React's synthetic event pool
            const adjustedEvent = event;
            adjustedEvent.value = defaultValue;
            onReset(adjustedEvent);
Severity: Minor
Found in src/js/components/Form/Form.js and 1 other location - About 35 mins to fix
src/js/components/DateInput/DateInput.js on lines 355..360

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      <StyledParagraph
        ref={ref}
        colorProp={color}
        fillProp={fill}
        size={size}
Severity: Minor
Found in src/js/components/Paragraph/Paragraph.js and 1 other location - About 35 mins to fix
src/js/components/Text/Text.js on lines 71..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const { container } = render(
      <Grommet>
        <Collapsible open>
          <Text>Example</Text>
        </Collapsible>
Severity: Minor
Found in src/js/components/Collapsible/__tests__/Collapsible-test.tsx and 1 other location - About 35 mins to fix
src/js/components/Collapsible/__tests__/Collapsible-test.tsx on lines 37..43

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

              <Button onClick={previousInBound ? onPreviousMonth : undefined}>
                <Box>
                  <FormPreviousLink />
                </Box>
              </Button>
Severity: Minor
Found in src/js/components/Calendar/__tests__/Calendar-test.tsx and 1 other location - About 35 mins to fix
src/js/components/Calendar/__tests__/Calendar-test.tsx on lines 172..176

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    const { container, rerender } = render(
      <Grommet>
        <Collapsible open>
          <Text>Example</Text>
        </Collapsible>
Severity: Minor
Found in src/js/components/Collapsible/__tests__/Collapsible-test.tsx and 1 other location - About 35 mins to fix
src/js/components/Collapsible/__tests__/Collapsible-test.tsx on lines 26..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 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          primaryKey={(item) => (
            <Text color="red" key={item.city}>
              {item.city}
            </Text>
          )}
Severity: Minor
Found in src/js/components/List/__tests__/List-test.tsx and 1 other location - About 35 mins to fix
src/js/components/List/__tests__/List-test.tsx on lines 1063..1067

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language