rofrischmann/bredon

View on GitHub
packages/bredon-validate/src/propertyValidators.js

Summary

Maintainability
F
6 days
Test Coverage

validators has 93 functions (exceeds 20 allowed). Consider refactoring.
Open

const validators = {
  MozBinding: isURL,
  MozBorderBottomColors: (node, isMultiValue) =>
    validateNodeList(isColor)(normalizeNodeList(node, isMultiValue)),
  MozBorderLeftColors: (node, isMultiValue) =>
Severity: Major
Found in packages/bredon-validate/src/propertyValidators.js - About 1 day to fix

    File propertyValidators.js has 715 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import {
      isInteger,
      isStringLiteral,
      isURL,
      isIdentifier,
    Severity: Major
    Found in packages/bredon-validate/src/propertyValidators.js - About 1 day to fix

      Consider simplifying this complex logical expression.
      Open

          if (isMultiValue) {
            return (
              (node.length === 2 &&
                validateUnorderedNodeList([
                  node =>
      Severity: Critical
      Found in packages/bredon-validate/src/propertyValidators.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

            if (isMultiValue) {
              return (
                (node.length === 2 &&
                  validateUnorderedNodeList([
                    validators.flexGrow,
        Severity: Critical
        Found in packages/bredon-validate/src/propertyValidators.js - About 1 hr to fix

          Function textShadow has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

            textShadow: (node, isMultiValue) => {
              if (isMultiValue) {
                if (node.length === 2) {
                  return validateNodeList(isLength)(node)
                }
          Severity: Minor
          Found in packages/bredon-validate/src/propertyValidators.js - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function flex has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

            flex: (node, isMultiValue) => {
              if (isMultiValue) {
                return (
                  (node.length === 2 &&
                    validateUnorderedNodeList([
          Severity: Minor
          Found in packages/bredon-validate/src/propertyValidators.js - About 25 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

            backgroundPositionX: (node, isMultiValue) => {
              if (isMultiValue) {
                return (
                  node.length === 2 &&
                  matchesIdentifier(['left', 'right', 'x-start', 'x-end'])(node[0]) &&
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 2 hrs to fix
          packages/bredon-validate/src/propertyValidators.js on lines 158..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 88.

          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

            backgroundPositionY: (node, isMultiValue) => {
              if (isMultiValue) {
                return (
                  node.length === 2 &&
                  matchesIdentifier(['top', 'bottom', 'y-start', 'y-end'])(node[0]) &&
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 2 hrs to fix
          packages/bredon-validate/src/propertyValidators.js on lines 143..157

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

          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

            borderInlineEndWidth: (node, isMultiValue) => {
              if (isMultiValue && node.length <= 4) {
                return validateNodeList(
                  node => isLength(node) || matchesKeyword('borderInlineEndWidth')(node)
                )
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 4 other locations - About 1 hr to fix
          packages/bredon-validate/src/propertyValidators.js on lines 203..211
          packages/bredon-validate/src/propertyValidators.js on lines 223..231
          packages/bredon-validate/src/propertyValidators.js on lines 307..315
          packages/bredon-validate/src/propertyValidators.js on lines 628..636

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

          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

            borderInlineStartWidth: (node, isMultiValue) => {
              if (isMultiValue && node.length <= 4) {
                return validateNodeList(
                  node => isLength(node) || matchesKeyword('borderInlineStartWidth')(node)
                )
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 4 other locations - About 1 hr to fix
          packages/bredon-validate/src/propertyValidators.js on lines 203..211
          packages/bredon-validate/src/propertyValidators.js on lines 223..231
          packages/bredon-validate/src/propertyValidators.js on lines 287..295
          packages/bredon-validate/src/propertyValidators.js on lines 628..636

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

          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

            textOverflow: (node, isMultiValue) => {
              if (isMultiValue && node.length === 2) {
                return validateNodeList(
                  node => isStringLiteral(node) || matchesKeyword('textOverflow')(node)
                )
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 4 other locations - About 1 hr to fix
          packages/bredon-validate/src/propertyValidators.js on lines 203..211
          packages/bredon-validate/src/propertyValidators.js on lines 223..231
          packages/bredon-validate/src/propertyValidators.js on lines 287..295
          packages/bredon-validate/src/propertyValidators.js on lines 307..315

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

          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

            borderBlockStartWidth: (node, isMultiValue) => {
              if (isMultiValue && node.length <= 4) {
                return validateNodeList(
                  node => isLength(node) || matchesKeyword('borderBlockStartWidth')(node)
                )
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 4 other locations - About 1 hr to fix
          packages/bredon-validate/src/propertyValidators.js on lines 203..211
          packages/bredon-validate/src/propertyValidators.js on lines 287..295
          packages/bredon-validate/src/propertyValidators.js on lines 307..315
          packages/bredon-validate/src/propertyValidators.js on lines 628..636

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

          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

            borderBlockEndWidth: (node, isMultiValue) => {
              if (isMultiValue && node.length <= 4) {
                return validateNodeList(
                  node => isLength(node) || matchesKeyword('borderBlockEndWidth')(node)
                )
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 4 other locations - About 1 hr to fix
          packages/bredon-validate/src/propertyValidators.js on lines 223..231
          packages/bredon-validate/src/propertyValidators.js on lines 287..295
          packages/bredon-validate/src/propertyValidators.js on lines 307..315
          packages/bredon-validate/src/propertyValidators.js on lines 628..636

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

          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

                    validateUnorderedNodeList([
                      node =>
                        isLengthPercentage(node) ||
                        matchesIdentifier(['left', 'center', 'right'])(node),
                      node =>
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 1 hr to fix
          packages/bredon-validate/src/propertyValidators.js on lines 691..698

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

          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

                    validateUnorderedNodeList([
                      node =>
                        isLengthPercentage(node) ||
                        matchesIdentifier(['left', 'center', 'right'])(node),
                      node =>
          Severity: Major
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 1 hr to fix
          packages/bredon-validate/src/propertyValidators.js on lines 700..707

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

          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

            textDecorationLine: (node, isMultiValue) =>
              validateUnorderedNodeList([
                matchesIdentifier(['underline']),
                matchesIdentifier(['overline']),
                matchesIdentifier(['line-through']),
          Severity: Minor
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 50 mins to fix
          packages/bredon-validate/src/propertyValidators.js on lines 392..398

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

          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

            contain: (node, isMultiValue) =>
              validateUnorderedNodeList([
                matchesIdentifier(['size']),
                matchesIdentifier(['layout']),
                matchesIdentifier(['style']),
          Severity: Minor
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 50 mins to fix
          packages/bredon-validate/src/propertyValidators.js on lines 575..581

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

          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

            margin: (node, isMultiValue) =>
              validateNodeList(
                // margin-left is equivalent to -top, -bottom, -right
                node => validators.marginLeft(node) || matchesKeyword('marginLeft')(node),
                4
          Severity: Minor
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 45 mins to fix
          packages/bredon-validate/src/propertyValidators.js on lines 520..526

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

            padding: (node, isMultiValue) =>
              validateNodeList(
                // padding-left is equivalent to -top, -bottom, -right
                node =>
                  validators.paddingLeft(node) || matchesKeyword('paddingLeft')(node),
          Severity: Minor
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 45 mins to fix
          packages/bredon-validate/src/propertyValidators.js on lines 457..462

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

                    ((validators.flexGrow(node[0]) &&
                      validators.flexShrink(node[1]) &&
                      validators.flexBasis(node[2])) ||
          Severity: Minor
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 30 mins to fix
          packages/bredon-validate/src/propertyValidators.js on lines 412..414

          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

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

                      (validators.flexBasis(node[0]) &&
                        validators.flexGrow(node[1]) &&
                        validators.flexShrink(node[2]))))
          Severity: Minor
          Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 30 mins to fix
          packages/bredon-validate/src/propertyValidators.js on lines 409..411

          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