pedrojpj/recompose-extends

View on GitHub

Showing 52 of 52 total issues

Function withForm has 354 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const withForm = (input, handlers, errors) => BaseComponent => {
  const factory = createFactory(BaseComponent);

  class WithForm extends Component {
    constructor(props) {
Severity: Major
Found in src/withForm/index.js - About 1 day to fix

    File WithForm.test.js has 698 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import Enzyme, { mount } from 'enzyme';
    import Adapter from 'enzyme-adapter-react-16';
    import { compose, withState, withHandlers } from 'recompose';
    
    
    Severity: Major
    Found in src/withForm/WithForm.test.js - About 1 day to fix

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

        it('should not maintain any fields since they do not exist in the form', () => {
          const Form = ({ form, updateForm, updateField }) => (
            <form>
              <input
                type="text"
      Severity: Major
      Found in src/withForm/WithForm.test.js and 1 other location - About 1 day to fix
      src/withForm/WithForm.test.js on lines 332..353

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

      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

        it('should update value of a field with updateField func', () => {
          const Form = ({ form, updateForm, updateField }) => (
            <form>
              <input
                type="text"
      Severity: Major
      Found in src/withForm/WithForm.test.js and 1 other location - About 1 day to fix
      src/withForm/WithForm.test.js on lines 355..376

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 225.

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

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

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

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

      Refactorings

      Further Reading

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

          <div className="form-group">
            <label htmlFor="password">
              Password
              <input
                type="password"
      Severity: Major
      Found in example/withForm.js and 5 other locations - About 5 hrs to fix
      example/withForm.js on lines 26..45
      example/withForm.js on lines 46..65
      example/withForm.js on lines 66..85
      example/withForm.js on lines 86..105
      example/withForm.js on lines 174..193

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

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

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

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

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

      Refactorings

      Further Reading

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

          <div className="form-group">
            <label htmlFor="vat">
              Vat
              <input
                type="text"
      Severity: Major
      Found in example/withForm.js and 5 other locations - About 5 hrs to fix
      example/withForm.js on lines 26..45
      example/withForm.js on lines 46..65
      example/withForm.js on lines 66..85
      example/withForm.js on lines 153..172
      example/withForm.js on lines 174..193

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

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

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

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

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

      Refactorings

      Further Reading

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

          <div className="form-group">
            <label htmlFor="email">
              Email
              <input
                type="email"
      Severity: Major
      Found in example/withForm.js and 5 other locations - About 5 hrs to fix
      example/withForm.js on lines 46..65
      example/withForm.js on lines 66..85
      example/withForm.js on lines 86..105
      example/withForm.js on lines 153..172
      example/withForm.js on lines 174..193

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

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

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

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

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

      Refactorings

      Further Reading

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

          <div className="form-group">
            <label htmlFor="password">
              Repeat Password
              <input
                type="password"
      Severity: Major
      Found in example/withForm.js and 5 other locations - About 5 hrs to fix
      example/withForm.js on lines 26..45
      example/withForm.js on lines 46..65
      example/withForm.js on lines 66..85
      example/withForm.js on lines 86..105
      example/withForm.js on lines 153..172

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

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

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

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

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

      Refactorings

      Further Reading

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

          <div className="form-group">
            <label htmlFor="name">
              Name
              <input
                type="text"
      Severity: Major
      Found in example/withForm.js and 5 other locations - About 5 hrs to fix
      example/withForm.js on lines 26..45
      example/withForm.js on lines 66..85
      example/withForm.js on lines 86..105
      example/withForm.js on lines 153..172
      example/withForm.js on lines 174..193

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

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

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

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

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

      Refactorings

      Further Reading

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

          <div className="form-group">
            <label htmlFor="copyName">
              Copy Name
              <input
                type="text"
      Severity: Major
      Found in example/withForm.js and 5 other locations - About 5 hrs to fix
      example/withForm.js on lines 26..45
      example/withForm.js on lines 46..65
      example/withForm.js on lines 86..105
      example/withForm.js on lines 153..172
      example/withForm.js on lines 174..193

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

      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 Component = compose(
            withForm({
              elements: {
                value: [{ id: 1, value: 1 }, { id: 2, value: 2 }],
                required: true
      Severity: Major
      Found in src/withForm/WithForm.test.js and 1 other location - About 4 hrs to fix
      src/withForm/WithForm.test.js on lines 533..548

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

      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 Component = compose(
            withForm({
              elements: {
                value: [{ id: 1, value: 1 }, { id: 2, value: 2 }],
                required: true
      Severity: Major
      Found in src/withForm/WithForm.test.js and 1 other location - About 4 hrs to fix
      src/withForm/WithForm.test.js on lines 496..511

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

      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

      File index.js has 358 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { createFactory, Component } from 'react';
      
      const withForm = (input, handlers, errors) => BaseComponent => {
        const factory = createFactory(BaseComponent);
      
      
      Severity: Minor
      Found in src/withForm/index.js - About 4 hrs to fix

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

            const Form = ({ form, updateForm, submitForm }) => (
              <form>
                <input name="password" value={form.password} onChange={updateForm} />
                <input
                  name="repeatPassword"
        Severity: Major
        Found in src/withForm/WithForm.test.js and 3 other locations - About 4 hrs to fix
        src/withForm/WithForm.test.js on lines 628..634
        src/withForm/WithForm.test.js on lines 657..663
        src/withForm/WithForm.test.js on lines 699..705

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

        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

            const Form = ({ form, updateForm, submitForm }) => (
              <form>
                <input name="name" value={form.name} onChange={updateForm} />
                <input name="email" value={form.email} onChange={updateForm} />
                <button type="submit" onClick={submitForm} />
        Severity: Major
        Found in src/withForm/WithForm.test.js and 3 other locations - About 4 hrs to fix
        src/withForm/WithForm.test.js on lines 591..601
        src/withForm/WithForm.test.js on lines 628..634
        src/withForm/WithForm.test.js on lines 699..705

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

        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

            const Form = ({ form, updateForm, submitForm }) => (
              <form>
                <input name="name" value={form.name} onChange={updateForm} />
                <input name="copyName" value={form.copyName} onChange={updateForm} />
                <button type="submit" onClick={submitForm} />
        Severity: Major
        Found in src/withForm/WithForm.test.js and 3 other locations - About 4 hrs to fix
        src/withForm/WithForm.test.js on lines 591..601
        src/withForm/WithForm.test.js on lines 657..663
        src/withForm/WithForm.test.js on lines 699..705

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

        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

            const Form = ({ form, updateForm, submitForm }) => (
              <form>
                <input name="name" value={form.name} onChange={updateForm} />
                <input name="email" value={form.email} onChange={updateForm} />
                <button type="submit" onClick={submitForm} />
        Severity: Major
        Found in src/withForm/WithForm.test.js and 3 other locations - About 4 hrs to fix
        src/withForm/WithForm.test.js on lines 591..601
        src/withForm/WithForm.test.js on lines 628..634
        src/withForm/WithForm.test.js on lines 657..663

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

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

            const Form = ({ form, updateForm, submitForm }) => (
              <form>
                <input
                  type="password"
                  name="password"
        Severity: Major
        Found in src/withForm/WithForm.test.js and 7 other locations - About 2 hrs to fix
        src/withForm/WithForm.test.js on lines 49..59
        src/withForm/WithForm.test.js on lines 70..80
        src/withForm/WithForm.test.js on lines 99..109
        src/withForm/WithForm.test.js on lines 180..190
        src/withForm/WithForm.test.js on lines 215..225
        src/withForm/WithForm.test.js on lines 265..275
        src/withForm/WithForm.test.js on lines 291..301

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

            const Form = ({ form, updateForm, submitForm }) => (
              <form>
                <input
                  type="checkbox"
                  name="check"
        Severity: Major
        Found in src/withForm/WithForm.test.js and 7 other locations - About 2 hrs to fix
        src/withForm/WithForm.test.js on lines 49..59
        src/withForm/WithForm.test.js on lines 70..80
        src/withForm/WithForm.test.js on lines 99..109
        src/withForm/WithForm.test.js on lines 130..140
        src/withForm/WithForm.test.js on lines 180..190
        src/withForm/WithForm.test.js on lines 215..225
        src/withForm/WithForm.test.js on lines 291..301

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

            const Form = ({ form, updateForm, submitForm }) => (
              <form>
                <input name="name" value={form.name} onChange={updateForm} />
                <button type="submit" onClick={submitForm} />
              </form>
        Severity: Major
        Found in src/withForm/WithForm.test.js and 4 other locations - About 2 hrs to fix
        src/withForm/WithForm.test.js on lines 449..454
        src/withForm/WithForm.test.js on lines 733..738
        src/withForm/WithForm.test.js on lines 769..774
        src/withForm/WithForm.test.js on lines 802..807

        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

        Severity
        Category
        Status
        Source
        Language