AZaviruha/react-form-generator

View on GitHub

Showing 82 of 82 total issues

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

        handleOnChange: function ( e ) {
            var truthMap = getOrNull( this._spec(), 'truthMap' )
              , checked  = e.target.checked ? 'true' : 'false'
              , value    = truthMap ? truthMap[ checked ] : checked;

Severity: Major
Found in src/components/compiled/primitives/checkbox.js and 1 other location - About 6 hrs to fix
src/components/primitives/checkbox.jsx on lines 26..40

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

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

        handleOnChange: function ( e ) {
            var truthMap = getOrNull( this._spec(), 'truthMap' )
              , checked  = e.target.checked ? 'true' : 'false'
              , value    = truthMap ? truthMap[ checked ] : checked;

Severity: Major
Found in src/components/primitives/checkbox.jsx and 1 other location - About 6 hrs to fix
src/components/compiled/primitives/checkbox.js on lines 26..40

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

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

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

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

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

Refactorings

Further Reading

Function formGenerator has 146 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function formGenerator ( conf ) { 
    conf = conf || {};

    var v        = require( '../../validation' )( conf.validators )
      , validate = v.validateField;
Severity: Major
Found in src/components/generated-form.jsx - About 5 hrs to fix

    Function formGenerator has 146 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function formGenerator ( conf ) { 
        conf = conf || {};
    
        var v        = require( '../../validation' )( conf.validators )
          , validate = v.validateField;
    Severity: Major
    Found in src/components/compiled/generated-form.js - About 5 hrs to fix

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

              handleOnChange: function ( e ) {
                  var res = { 
                      id:    this._conf().fieldID,
                      meta:  this._meta(),
                      value: {}
      Severity: Major
      Found in src/components/compiled/primitives/select.js and 5 other locations - About 4 hrs to fix
      src/components/compiled/primitives/text.js on lines 25..35
      src/components/compiled/primitives/textarea.js on lines 25..35
      src/components/primitives/select.jsx on lines 26..36
      src/components/primitives/text.jsx on lines 25..35
      src/components/primitives/textarea.jsx on lines 25..35

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

      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

              handleOnChange: function ( e ) {
                  var res = { 
                      id:    this._conf().fieldID,
                      meta:  this._meta(),
                      value: {}
      Severity: Major
      Found in src/components/primitives/textarea.jsx and 5 other locations - About 4 hrs to fix
      src/components/compiled/primitives/select.js on lines 26..36
      src/components/compiled/primitives/text.js on lines 25..35
      src/components/compiled/primitives/textarea.js on lines 25..35
      src/components/primitives/select.jsx on lines 26..36
      src/components/primitives/text.jsx on lines 25..35

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

      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

              handleOnChange: function ( e ) {
                  var res = { 
                      id:    this._conf().fieldID,
                      meta:  this._meta(),
                      value: {}
      Severity: Major
      Found in src/components/compiled/primitives/textarea.js and 5 other locations - About 4 hrs to fix
      src/components/compiled/primitives/select.js on lines 26..36
      src/components/compiled/primitives/text.js on lines 25..35
      src/components/primitives/select.jsx on lines 26..36
      src/components/primitives/text.jsx on lines 25..35
      src/components/primitives/textarea.jsx on lines 25..35

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

      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

              handleOnChange: function ( e ) {
                  var res = { 
                      id:    this._conf().fieldID,
                      meta:  this._meta(),
                      value: {}
      Severity: Major
      Found in src/components/primitives/text.jsx and 5 other locations - About 4 hrs to fix
      src/components/compiled/primitives/select.js on lines 26..36
      src/components/compiled/primitives/text.js on lines 25..35
      src/components/compiled/primitives/textarea.js on lines 25..35
      src/components/primitives/select.jsx on lines 26..36
      src/components/primitives/textarea.jsx on lines 25..35

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

      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

              handleOnChange: function ( e ) {
                  var res = { 
                      id:    this._conf().fieldID,
                      meta:  this._meta(),
                      value: {}
      Severity: Major
      Found in src/components/compiled/primitives/text.js and 5 other locations - About 4 hrs to fix
      src/components/compiled/primitives/select.js on lines 26..36
      src/components/compiled/primitives/textarea.js on lines 25..35
      src/components/primitives/select.jsx on lines 26..36
      src/components/primitives/text.jsx on lines 25..35
      src/components/primitives/textarea.jsx on lines 25..35

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

      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

              handleOnChange: function ( e ) {
                  var res = { 
                      id:    this._conf().fieldID,
                      meta:  this._meta(),
                      value: {}
      Severity: Major
      Found in src/components/primitives/select.jsx and 5 other locations - About 4 hrs to fix
      src/components/compiled/primitives/select.js on lines 26..36
      src/components/compiled/primitives/text.js on lines 25..35
      src/components/compiled/primitives/textarea.js on lines 25..35
      src/components/primitives/text.jsx on lines 25..35
      src/components/primitives/textarea.jsx on lines 25..35

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

      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

              handleOnChange: function ( e, item ) {
                  var res = { 
                      id:    this._conf().fieldID,
                      meta:  this._meta(),
                      value: {}
      Severity: Major
      Found in src/components/primitives/radiogroup.jsx and 1 other location - About 3 hrs to fix
      src/components/compiled/primitives/radiogroup.js on lines 26..36

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

      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

              handleOnChange: function ( e, item ) {
                  var res = { 
                      id:    this._conf().fieldID,
                      meta:  this._meta(),
                      value: {}
      Severity: Major
      Found in src/components/compiled/primitives/radiogroup.js and 1 other location - About 3 hrs to fix
      src/components/primitives/radiogroup.jsx on lines 26..36

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

      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

              handleFormChanged: function ( newValue, change, fldErrors ) {
                  log.debug( 'handleFormChanged :: newValue :: ', newValue );
                  log.debug( 'handleFormChanged :: change :: ', change );
                  log.debug( 'handleFormChanged :: formErrors :: ', fldErrors );
                  this.setState({ 
      Severity: Major
      Found in demo/client/js/main.js and 1 other location - About 3 hrs to fix
      demo/client/js/main2.js on lines 29..38

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

      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

              handleFormChanged: function ( newValue, change, fldErrors ) {
                  log.debug( 'handleFormChanged :: newValue :: ', newValue );
                  log.debug( 'handleFormChanged :: change :: ', change );
                  log.debug( 'handleFormChanged :: formErrors :: ', fldErrors );
                  this.setState({ 
      Severity: Major
      Found in demo/client/js/main2.js and 1 other location - About 3 hrs to fix
      demo/client/js/main.js on lines 125..134

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

      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

              render: function () {
                  var config = this._conf()
                    , meta   = this._meta()
                    , spec   = this._spec();
                  
      Severity: Major
      Found in demo/client/js/main.js and 1 other location - About 3 hrs to fix
      src/components/primitives/radiogroup.jsx on lines 43..56

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

      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

              render: function () {
                  var config = this._conf()
                    , meta   = this._meta()
                    , spec   = this._spec();
      
      
      Severity: Major
      Found in src/components/primitives/radiogroup.jsx and 1 other location - About 3 hrs to fix
      demo/client/js/main.js on lines 57..70

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

      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

          var RENDERERS = merge({
              text:       require( './primitives/text' )( R, t ),
              textarea:   require( './primitives/textarea' )( R, t ),
              checkbox:   require( './primitives/checkbox' )( R, t ),
              radiogroup: require( './primitives/radiogroup' )( R, t ),
      Severity: Major
      Found in src/components/compiled/generated-form.js and 1 other location - About 3 hrs to fix
      src/components/generated-form.jsx on lines 30..37

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

      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

          var RENDERERS = merge({
              text:       require( './primitives/text' )( R, t ),
              textarea:   require( './primitives/textarea' )( R, t ),
              checkbox:   require( './primitives/checkbox' )( R, t ),
              radiogroup: require( './primitives/radiogroup' )( R, t ),
      Severity: Major
      Found in src/components/generated-form.jsx and 1 other location - About 3 hrs to fix
      src/components/compiled/generated-form.js on lines 30..37

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

      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

              handleFieldChanged: function ( fieldData ) {
                  var fieldID    = fieldData.id
                    , fieldMeta  = fieldData.meta
                    , formValue  = this.props.value
                    , fieldValue = getOrNull( fieldData.value, fieldID )
      Severity: Major
      Found in src/components/generated-form.jsx and 1 other location - About 3 hrs to fix
      src/components/compiled/generated-form.js on lines 185..195

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

      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

              handleFieldChanged: function ( fieldData ) {
                  var fieldID    = fieldData.id
                    , fieldMeta  = fieldData.meta
                    , formValue  = this.props.value
                    , fieldValue = getOrNull( fieldData.value, fieldID )
      Severity: Major
      Found in src/components/compiled/generated-form.js and 1 other location - About 3 hrs to fix
      src/components/generated-form.jsx on lines 185..195

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

      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