grommet/grommet

View on GitHub
src/js/components/Form/__tests__/Form-test-controlled.js

Summary

Maintainability
F
2 wks
Test Coverage

File Form-test-controlled.js has 1212 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useState } from 'react';
import userEvent from '@testing-library/user-event';

import 'jest-styled-components';

Severity: Major
Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 3 days to fix

    Function Test has 102 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const Test = () => {
          const [firstName, setFirstName] = useState('a');
          const [middleName, setMiddleName] = useState('1');
          const [lastName, setLastName] = useState('');
          const [title, setTitle] = useState(1);
    Severity: Major
    Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 4 hrs to fix

      Function Test has 97 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          const Test = () => {
            const [firstName, setFirstName] = useState('J');
            const [middleName, setMiddleName] = useState('1');
            const [lastName, setLastName] = useState('');
            const [title, setTitle] = useState(1);
      Severity: Major
      Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 3 hrs to fix

        Function Test has 75 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            const Test = () => {
              const [formValue, setFormValue] = useState({
                firstName: 'J',
                middleName: '1',
                lastName: '',
        Severity: Major
        Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 3 hrs to fix

          Function Test has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              const Test = () => {
                const options = ['foo', 'bar', 'baz'];
                const [formValue, setFormValue] = useState({
                  firstName: '',
                  multiple: [],
          Severity: Major
          Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 2 hrs to fix

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

                const Test = () => {
                  const [value, setValue] = React.useState({
                    phones: [
                      { number: '', ext: '' },
                      { number: '', ext: '' },
            Severity: Minor
            Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 1 hr to fix

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

                  const Test = () => {
                    const [value, setValue] = React.useState({
                      test: '',
                      phones: [
                        { number: '', ext: '' },
              Severity: Minor
              Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 1 hr to fix

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

                    const Test = () => {
                      const [value, setValue] = React.useState({
                        test: '',
                        phones: [
                          { number: '', ext: '' },
                Severity: Minor
                Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 1 hr to fix

                  Function Test has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      const Test = () => {
                        const [value, setValue] = React.useState({ name: '', toggle: false });
                        return (
                          <Form
                            validate="blur"
                  Severity: Minor
                  Found in src/js/components/Form/__tests__/Form-test-controlled.js - About 1 hr to fix

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

                        const Test = () => {
                          const [value, setValue] = React.useState({ test: '' });
                          const onChange = React.useCallback(
                            (nextValue) => setValue(nextValue),
                            [],
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 6 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 123..137

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

                    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 Test = () => {
                          const [value, setValue] = React.useState({ test: '' });
                          const onChange = React.useCallback(
                            (nextValue) => setValue(nextValue),
                            [],
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 6 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 164..178

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

                    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

                              <FormField
                                label="Last Name"
                                htmlFor="last-name"
                                name="lastName"
                                required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 4 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1053..1076

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

                    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

                              <FormField
                                label="First Name"
                                htmlFor="first-name"
                                name="firstName"
                                required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 4 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1100..1123

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

                    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

                              <FormField
                                label="Title"
                                htmlFor="title"
                                name="title"
                                validate={[
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 4 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1077..1099

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

                              <FormField
                                label="Middle Name"
                                htmlFor="middle-name"
                                name="middleName"
                                validate={[
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 4 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1124..1145

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

                              <FormField
                                label="First Name"
                                htmlFor="first-name"
                                name="firstName"
                                required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 4 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 901..923

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

                    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

                              <FormField
                                label="Last Name"
                                htmlFor="last-name"
                                name="lastName"
                                required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 4 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 856..878

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

                    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

                              <FormField
                                label="Middle Name"
                                htmlFor="middle-name"
                                name="middleName"
                                validate={[
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 4 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 924..944

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

                    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

                              <FormField
                                label="Title"
                                htmlFor="title"
                                name="title"
                                validate={[
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 4 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 879..900

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

                    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

                          return (
                            <Form value={value} onChange={onChange} onSubmit={onSubmit}>
                              <FormField name="test">
                                <TextInput name="test" placeholder="test input" />
                              </FormField>
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 2 other locations - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 27..34
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 205..212

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

                    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

                          return (
                            <Form value={value} onChange={onChange} onSubmit={onSubmit}>
                              <FormField name="test">
                                <TextInput name="test" placeholder="test input" />
                              </FormField>
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 2 other locations - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 27..34
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 423..430

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

                    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

                          return (
                            <Form value={value} onChange={onChange} onSubmit={onSubmit}>
                              <FormField name="test">
                                <TextInput name="test" placeholder="test input" />
                              </FormField>
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 2 other locations - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 205..212
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 423..430

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

                    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

                              <FormField
                                label="Last Name"
                                htmlFor="last-name"
                                name="lastName"
                                required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 768..783

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

                    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

                          return (
                            <Form onSubmit={onSubmit}>
                              <FormField name="test">
                                <TextInput
                                  name="test"
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 242..254

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

                    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

                          return (
                            <Form onSubmit={onSubmit}>
                              <FormField name="test">
                                <TextInput
                                  name="test"
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 285..297

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

                    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

                              <FormField
                                label="First Name"
                                htmlFor="first-name"
                                name="firstName"
                                required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 799..814

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

                    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

                              <FormField
                                label="Middle Name"
                                htmlFor="middle-name"
                                name="middleName"
                                validate={[
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 815..828

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

                    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

                              <FormField
                                label="Title"
                                htmlFor="title"
                                name="title"
                                validate={[
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 2 hrs to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 784..798

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

                    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

                            <FormField
                              label="Blur"
                              name="blur"
                              aria-label="blur"
                              required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 2 other locations - About 1 hr to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1185..1198
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1200..1213

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

                    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

                            <FormField
                              label="Submit"
                              name="submit"
                              aria-label="submit"
                              required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 2 other locations - About 1 hr to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1170..1183
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1200..1213

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

                    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

                            <FormField
                              label="Change"
                              name="change"
                              aria-label="change"
                              required
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 2 other locations - About 1 hr to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1170..1183
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 1185..1198

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    <FormField name={`phones[${idx}].ext`}>
                                      <TextInput
                                        name={`phones[${idx}].ext`}
                                        placeholder={`ext test input ${idx + 1}`}
                                      />
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 3 other locations - About 1 hr to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 574..579
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 580..585
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 652..657

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    <FormField name={`phones[${idx}].ext`}>
                                      <TextInput
                                        name={`phones[${idx}].ext`}
                                        placeholder={`ext test input ${idx + 1}`}
                                      />
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 3 other locations - About 1 hr to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 574..579
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 580..585
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 719..724

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    <FormField name={`phones[${idx}].ext`}>
                                      <TextInput
                                        name={`phones[${idx}].ext`}
                                        placeholder={`ext test input ${idx + 1}`}
                                      />
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 3 other locations - About 1 hr to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 574..579
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 652..657
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 719..724

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    <FormField name={`phones[${idx}].number`}>
                                      <TextInput
                                        name={`phones[${idx}].number`}
                                        placeholder={`number test input ${idx + 1}`}
                                      />
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 3 other locations - About 1 hr to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 580..585
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 652..657
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 719..724

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

                    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

                            <Form value={value} onChange={onChange} onValidate={onValidate}>
                              <FormField name="test" required>
                                <TextInput name="test" placeholder="test input" />
                              </FormField>
                              <Button type="submit" primary label="Submit" />
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 1 hr to fix
                    src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 194..199

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

                    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 [value, setValue] = React.useState({
                            test: '',
                            phones: [
                              { number: '', ext: '' },
                              { number: '', ext: '' },
                    Severity: Minor
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 55 mins to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 627..633

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

                    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 [value, setValue] = React.useState({
                            test: '',
                            phones: [
                              { number: '', ext: '' },
                              { number: '', ext: '' },
                    Severity: Minor
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 55 mins to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 694..700

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        expect(onValidate).toHaveBeenLastCalledWith(
                          expect.objectContaining({
                            errors: { mood: 'required' },
                            infos: {},
                            valid: false,
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 3 other locations - About 45 mins to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 509..515
                    src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 1425..1431
                    src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 1447..1453

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        expect(onValidate).toHaveBeenLastCalledWith(
                          expect.objectContaining({
                            errors: { mood: 'required' },
                            infos: {},
                            valid: false,
                    Severity: Major
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 3 other locations - About 45 mins to fix
                    src/js/components/Form/__tests__/Form-test-controlled.js on lines 531..537
                    src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 1425..1431
                    src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 1447..1453

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

                    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 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 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 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 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
                    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 { 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 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 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 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 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
                    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 { 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 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

                    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 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-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 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 310..315
                    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

                    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 310..315
                    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 { getByPlaceholderText, getByLabelText, 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 362..366
                    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

                    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

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

                        expect(onValidate).toHaveBeenLastCalledWith(
                          expect.objectContaining({ errors: {}, infos: {}, valid: true }),
                        );
                    Severity: Minor
                    Found in src/js/components/Form/__tests__/Form-test-controlled.js and 1 other location - About 30 mins to fix
                    src/js/components/Form/__tests__/Form-test-uncontrolled.js on lines 1438..1440

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

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

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

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

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

                    Refactorings

                    Further Reading

                    There are no issues that match your filters.

                    Category
                    Status