packages/babel-helper-create-class-features-plugin/src/fields.js

Summary

Maintainability
F
1 wk
Test Coverage

File fields.js has 662 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { template, traverse, types as t } from "@babel/core";
import ReplaceSupers, {
  environmentVisitor,
} from "@babel/helper-replace-supers";
import memberExpressionToFunctions from "@babel/helper-member-expression-to-functions";
Severity: Major
Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 1 day to fix

    Function buildFieldsInitNodes has 130 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function buildFieldsInitNodes(
      ref,
      superRef,
      props,
      privateNamesMap,
    Severity: Major
    Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 5 hrs to fix

      Function buildFieldsInitNodes has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

      export function buildFieldsInitNodes(
        ref,
        superRef,
        props,
        privateNamesMap,
      Severity: Minor
      Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 2 hrs 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 buildPrivateMethodDeclaration has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function buildPrivateMethodDeclaration(prop, privateNamesMap, loose = false) {
        const privateName = privateNamesMap.get(prop.node.key.id.name);
        const {
          id,
          methodId,
      Severity: Minor
      Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 1 hr to fix

        Function get has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          get(member) {
            const { classRef, privateNamesMap, file } = this;
            const { name } = member.node.property.id;
            const {
              id,
        Severity: Minor
        Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 1 hr to fix

          Function set has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            set(member, value) {
              const { classRef, privateNamesMap, file } = this;
              const { name } = member.node.property.id;
              const {
                id,
          Severity: Minor
          Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 1 hr to fix

            Function privateNameVisitorFactory has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function privateNameVisitorFactory(visitor) {
              const privateNameVisitor = {
                ...visitor,
            
                Class(path) {
            Severity: Minor
            Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 1 hr to fix

              Function buildPrivateNamesNodes has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

              export function buildPrivateNamesNodes(privateNamesMap, loose, state) {
                const initNodes = [];
              
                for (const [name, value] of privateNamesMap) {
                  // In loose mode, both static and instance fields are transpiled using a
              Severity: Minor
              Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 1 hr 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 buildPrivateNamesMap has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

              export function buildPrivateNamesMap(props) {
                const privateNamesMap = new Map();
                for (const prop of props) {
                  const isPrivate = prop.isPrivate();
                  const isMethod = !prop.isProperty();
              Severity: Minor
              Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 1 hr 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 buildFieldsInitNodes has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                ref,
                superRef,
                props,
                privateNamesMap,
                state,
              Severity: Minor
              Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 45 mins to fix

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

                  set(member, value) {
                    const { classRef, privateNamesMap, file } = this;
                    const { name } = member.node.property.id;
                    const {
                      id,
                Severity: Minor
                Found in packages/babel-helper-create-class-features-plugin/src/fields.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 get has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                  get(member) {
                    const { classRef, privateNamesMap, file } = this;
                    const { name } = member.node.property.id;
                    const {
                      id,
                Severity: Minor
                Found in packages/babel-helper-create-class-features-plugin/src/fields.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 buildPrivateStaticFieldInitSpec has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                function buildPrivateStaticFieldInitSpec(prop, privateNamesMap) {
                  const privateName = privateNamesMap.get(prop.node.key.id.name);
                  const { id, getId, setId, initAdded } = privateName;
                  const isAccessor = getId || setId;
                
                
                Severity: Minor
                Found in packages/babel-helper-create-class-features-plugin/src/fields.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 transformPrivateNamesUsage has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  ref,
                  path,
                  privateNamesMap,
                  loose,
                  state,
                Severity: Minor
                Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 35 mins to fix

                  Function replaceThisContext has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function replaceThisContext(path, ref, superRef, file, loose) {
                  Severity: Minor
                  Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 35 mins to fix

                    Function buildPrivateMethodInitLoose has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function buildPrivateMethodInitLoose(ref, prop, privateNamesMap) {
                      const privateName = privateNamesMap.get(prop.node.key.id.name);
                      const { methodId, id, getId, setId, initAdded } = privateName;
                      if (initAdded) return;
                    
                    
                    Severity: Minor
                    Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 35 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 privateNameVisitorFactory has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function privateNameVisitorFactory(visitor) {
                      const privateNameVisitor = {
                        ...visitor,
                    
                        Class(path) {
                    Severity: Minor
                    Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 35 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

                    Avoid too many return statements within this function.
                    Open

                          return;
                    Severity: Major
                    Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return;
                      Severity: Major
                      Found in packages/babel-helper-create-class-features-plugin/src/fields.js - About 30 mins to fix

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

                        function buildPrivateInstanceMethodInitSpec(ref, prop, privateNamesMap) {
                          const privateName = privateNamesMap.get(prop.node.key.id.name);
                          const { id, getId, setId, initAdded } = privateName;
                        
                          if (initAdded) return;
                        Severity: Minor
                        Found in packages/babel-helper-create-class-features-plugin/src/fields.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

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

                          BinaryExpression(path) {
                            const { operator, left, right } = path.node;
                            if (operator !== "in") return;
                            if (!path.get("left").isPrivateName()) return;
                        
                        
                        Severity: Minor
                        Found in packages/babel-helper-create-class-features-plugin/src/fields.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

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

                        function buildPrivateStaticMethodInitLoose(ref, prop, state, privateNamesMap) {
                          const privateName = privateNamesMap.get(prop.node.key.id.name);
                          const { id, methodId, getId, setId, initAdded } = privateName;
                        
                          if (initAdded) return;
                        Severity: Minor
                        Found in packages/babel-helper-create-class-features-plugin/src/fields.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 3 locations. Consider refactoring.
                        Open

                          if (isAccessor) {
                            privateNamesMap.set(prop.node.key.id.name, {
                              ...privateName,
                              initAdded: true,
                            });
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 462..477
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 487..499

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                          if (isAccessor) {
                            privateNamesMap.set(prop.node.key.id.name, {
                              ...privateName,
                              initAdded: true,
                            });
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 487..499
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 536..551

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                          if (isAccessor) {
                            privateNamesMap.set(prop.node.key.id.name, {
                              ...privateName,
                              initAdded: true,
                            });
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 462..477
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 536..551

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

                        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

                        function buildPrivateInstanceFieldInitSpec(ref, prop, privateNamesMap) {
                          const { id } = privateNamesMap.get(prop.node.key.id.name);
                          const value = prop.node.value || prop.scope.buildUndefinedNode();
                        
                          return template.statement.ast`${id}.set(${ref}, {
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 385..397

                        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

                        function buildPrivateFieldInitLoose(ref, prop, privateNamesMap) {
                          const { id } = privateNamesMap.get(prop.node.key.id.name);
                          const value = prop.node.value || prop.scope.buildUndefinedNode();
                        
                          return template.statement.ast`
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 399..409

                        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

                          receiver(member) {
                            const { object } = member.node;
                        
                            if (this.memoiser.has(object)) {
                              return t.cloneNode(this.memoiser.get(object));
                        packages/babel-helper-replace-supers/src/index.js on lines 169..176

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 79.

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

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

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

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

                        Refactorings

                        Further Reading

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

                          if (isSetter) {
                            privateNamesMap.set(prop.node.key.id.name, {
                              ...privateName,
                              setterDeclared: true,
                            });
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 585..593

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                          if (isGetter) {
                            privateNamesMap.set(prop.node.key.id.name, {
                              ...privateName,
                              getterDeclared: true,
                            });
                        packages/babel-helper-create-class-features-plugin/src/fields.js on lines 594..602

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

                        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