packages/babel-parser/src/parser/expression.js

Summary

Maintainability
F
3 wks
Test Coverage

File expression.js has 1967 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// @flow

// A recursive descent parser operates by defining functions for all
// syntactic elements, and recursively calling those, each function
// advancing the input stream and returning an AST node. Precedence
Severity: Major
Found in packages/babel-parser/src/parser/expression.js - About 5 days to fix

    ExpressionParser has 76 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export default class ExpressionParser extends LValParser {
      // Forward-declaration: defined in statement.js
      /*::
      +parseBlock: (
        allowDirectives?: boolean,
    Severity: Major
    Found in packages/babel-parser/src/parser/expression.js - About 1 day to fix

      Function parseExprAtom has 239 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        parseExprAtom(refExpressionErrors?: ?ExpressionErrors): N.Expression {
          // If a division operator appears in an expression position, the
          // tokenizer got confused, and we force it to read a regexp instead.
          if (this.state.type === tt.slash) this.readRegexp();
      
      
      Severity: Major
      Found in packages/babel-parser/src/parser/expression.js - About 1 day to fix

        Function parseExprAtom has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
        Open

          parseExprAtom(refExpressionErrors?: ?ExpressionErrors): N.Expression {
            // If a division operator appears in an expression position, the
            // tokenizer got confused, and we force it to read a regexp instead.
            if (this.state.type === tt.slash) this.readRegexp();
        
        
        Severity: Minor
        Found in packages/babel-parser/src/parser/expression.js - About 6 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 parseExprOp has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
        Open

          parseExprOp(
            left: N.Expression,
            leftStartPos: number,
            leftStartLoc: Position,
            minPrec: number,
        Severity: Minor
        Found in packages/babel-parser/src/parser/expression.js - About 5 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 parseSubscript has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
        Open

          parseSubscript(
            base: N.Expression,
            startPos: number,
            startLoc: Position,
            noCalls: ?boolean,
        Severity: Minor
        Found in packages/babel-parser/src/parser/expression.js - About 5 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 parseSubscript has 106 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          parseSubscript(
            base: N.Expression,
            startPos: number,
            startLoc: Position,
            noCalls: ?boolean,
        Severity: Major
        Found in packages/babel-parser/src/parser/expression.js - About 4 hrs to fix

          Function parseParenAndDistinguishExpression has 104 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression {
              const startPos = this.state.start;
              const startLoc = this.state.startLoc;
          
              let val;
          Severity: Major
          Found in packages/babel-parser/src/parser/expression.js - About 4 hrs to fix

            Function parseParenAndDistinguishExpression has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

              parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression {
                const startPos = this.state.start;
                const startLoc = this.state.startLoc;
            
                let val;
            Severity: Minor
            Found in packages/babel-parser/src/parser/expression.js - About 4 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 parseMaybeAssign has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

              parseMaybeAssign(
                noIn?: ?boolean,
                refExpressionErrors?: ?ExpressionErrors,
                afterLeftParse?: Function,
                refNeedsArrowPos?: ?Pos,
            Severity: Minor
            Found in packages/babel-parser/src/parser/expression.js - About 3 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 parseCallExpressionArguments has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

              parseCallExpressionArguments(
                close: TokenType,
                possibleAsyncArrow: boolean,
                dynamicImport?: boolean,
                allowPlaceholder?: boolean,
            Severity: Minor
            Found in packages/babel-parser/src/parser/expression.js - About 3 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 parseExprOp has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              parseExprOp(
                left: N.Expression,
                leftStartPos: number,
                leftStartLoc: Position,
                minPrec: number,
            Severity: Major
            Found in packages/babel-parser/src/parser/expression.js - About 2 hrs to fix

              Function finishCallExpression has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
              Open

                finishCallExpression<T: N.CallExpression | N.OptionalCallExpression>(
                  node: T,
                  optional: boolean,
                ): N.Expression {
                  if (node.callee.type === "Import") {
              Severity: Minor
              Found in packages/babel-parser/src/parser/expression.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 parseMaybeUnary has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
              Open

                parseMaybeUnary(refExpressionErrors: ?ExpressionErrors): N.Expression {
                  if (this.isContextual("await") && this.isAwaitAllowed()) {
                    return this.parseAwait();
                  } else if (this.state.type.prefix) {
                    const node = this.startNode();
              Severity: Minor
              Found in packages/babel-parser/src/parser/expression.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 parseMaybeAssign has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                parseMaybeAssign(
                  noIn?: ?boolean,
                  refExpressionErrors?: ?ExpressionErrors,
                  afterLeftParse?: Function,
                  refNeedsArrowPos?: ?Pos,
              Severity: Major
              Found in packages/babel-parser/src/parser/expression.js - About 2 hrs to fix

                Function parseObjectMember has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                  parseObjectMember(
                    isPattern: boolean,
                    refExpressionErrors?: ?ExpressionErrors,
                  ): N.ObjectMember | N.SpreadElement | N.RestElement {
                    let decorators = [];
                Severity: Minor
                Found in packages/babel-parser/src/parser/expression.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 checkReservedWord has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                  checkReservedWord(
                    word: string,
                    startLoc: number,
                    checkKeywords: boolean,
                    isBinding: boolean,
                Severity: Minor
                Found in packages/babel-parser/src/parser/expression.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 parseObjectMember has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  parseObjectMember(
                    isPattern: boolean,
                    refExpressionErrors?: ?ExpressionErrors,
                  ): N.ObjectMember | N.SpreadElement | N.RestElement {
                    let decorators = [];
                Severity: Major
                Found in packages/babel-parser/src/parser/expression.js - About 2 hrs to fix

                  Function parseFunctionBody has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                    parseFunctionBody(
                      node: N.Function,
                      allowExpression: ?boolean,
                      isMethod?: boolean = false,
                    ): void {
                  Severity: Minor
                  Found in packages/babel-parser/src/parser/expression.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 parseFunctionBody has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    parseFunctionBody(
                      node: N.Function,
                      allowExpression: ?boolean,
                      isMethod?: boolean = false,
                    ): void {
                  Severity: Minor
                  Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                    Function parseMaybeUnary has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      parseMaybeUnary(refExpressionErrors: ?ExpressionErrors): N.Expression {
                        if (this.isContextual("await") && this.isAwaitAllowed()) {
                          return this.parseAwait();
                        } else if (this.state.type.prefix) {
                          const node = this.startNode();
                    Severity: Minor
                    Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                      Function parseCallExpressionArguments has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        parseCallExpressionArguments(
                          close: TokenType,
                          possibleAsyncArrow: boolean,
                          dynamicImport?: boolean,
                          allowPlaceholder?: boolean,
                      Severity: Minor
                      Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                        Function checkDuplicatedProto has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                        Open

                          checkDuplicatedProto(
                            prop: N.ObjectMember | N.SpreadElement,
                            protoRef: { used: boolean },
                            refExpressionErrors: ?ExpressionErrors,
                          ): void {
                        Severity: Minor
                        Found in packages/babel-parser/src/parser/expression.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

                        Consider simplifying this complex logical expression.
                        Open

                              if (
                                this.hasPrecedingLineBreak() ||
                                // All the following expressions are ambiguous:
                                //   await + 0, await - 0, await ( 0 ), await [ 0 ], await / 0 /u, await ``
                                this.match(tt.plusMin) ||
                        Severity: Critical
                        Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                          Function checkReservedWord has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            checkReservedWord(
                              word: string,
                              startLoc: number,
                              checkKeywords: boolean,
                              isBinding: boolean,
                          Severity: Minor
                          Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                            Function parseObj has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                              parseObj<T: N.ObjectPattern | N.ObjectExpression>(
                                close: TokenType,
                                isPattern: boolean,
                                isRecord?: ?boolean,
                                refExpressionErrors?: ?ExpressionErrors,
                            Severity: Minor
                            Found in packages/babel-parser/src/parser/expression.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 parseObjectProperty has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                            Open

                              parseObjectProperty(
                                prop: N.ObjectProperty,
                                startPos: ?number,
                                startLoc: ?Position,
                                isPattern: boolean,
                            Severity: Minor
                            Found in packages/babel-parser/src/parser/expression.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 parseObj has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              parseObj<T: N.ObjectPattern | N.ObjectExpression>(
                                close: TokenType,
                                isPattern: boolean,
                                isRecord?: ?boolean,
                                refExpressionErrors?: ?ExpressionErrors,
                            Severity: Minor
                            Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

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

                                parseExprList(
                                  close: TokenType,
                                  allowEmpty?: boolean,
                                  refExpressionErrors?: ?ExpressionErrors,
                                  nodeForExtra?: ?N.Node,
                              Severity: Minor
                              Found in packages/babel-parser/src/parser/expression.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 parseAwait has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                parseAwait(): N.AwaitExpression {
                                  const node = this.startNode();
                              
                                  this.next();
                              
                              
                              Severity: Minor
                              Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                                Function parseObjectProperty has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  parseObjectProperty(
                                    prop: N.ObjectProperty,
                                    startPos: ?number,
                                    startLoc: ?Position,
                                    isPattern: boolean,
                                Severity: Minor
                                Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

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

                                    parseNew(): N.NewExpression | N.MetaProperty {
                                      const node = this.startNode();
                                  
                                      let meta = this.startNode();
                                      this.next();
                                  Severity: Minor
                                  Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

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

                                      parseExprListItem(
                                        allowEmpty: ?boolean,
                                        refExpressionErrors?: ?ExpressionErrors,
                                        refNeedsArrowPos: ?Pos,
                                        allowPlaceholder: ?boolean,
                                    Severity: Minor
                                    Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                                      Function parseNew has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                        parseNew(): N.NewExpression | N.MetaProperty {
                                          const node = this.startNode();
                                      
                                          let meta = this.startNode();
                                          this.next();
                                      Severity: Minor
                                      Found in packages/babel-parser/src/parser/expression.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 parseAwait has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                        parseAwait(): N.AwaitExpression {
                                          const node = this.startNode();
                                      
                                          this.next();
                                      
                                      
                                      Severity: Minor
                                      Found in packages/babel-parser/src/parser/expression.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 parseIdentifierName has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        parseIdentifierName(pos: number, liberal?: boolean): string {
                                          let name: string;
                                      
                                          if (this.match(tt.name)) {
                                            name = this.state.value;
                                      Severity: Minor
                                      Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                                        Function body has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                (hasStrictModeDirective: boolean) => {
                                                  const nonSimple = !this.isSimpleParamList(node.params);
                                        
                                                  if (hasStrictModeDirective && nonSimple) {
                                                    // This logic is here to align the error location with the ESTree plugin.
                                        Severity: Minor
                                        Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

                                          Function parseIdentifierName has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                            parseIdentifierName(pos: number, liberal?: boolean): string {
                                              let name: string;
                                          
                                              if (this.match(tt.name)) {
                                                name = this.state.value;
                                          Severity: Minor
                                          Found in packages/babel-parser/src/parser/expression.js - About 55 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 parseObjectMethod has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                            parseObjectMethod(
                                              prop: N.ObjectMethod,
                                              isGenerator: boolean,
                                              isAsync: boolean,
                                              isPattern: boolean,
                                          Severity: Minor
                                          Found in packages/babel-parser/src/parser/expression.js - About 55 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 parseYield has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                            parseYield(noIn?: ?boolean): N.YieldExpression {
                                              const node = this.startNode();
                                          
                                              if (this.state.inParameters) {
                                                this.raise(node.start, Errors.YieldInParameter);
                                          Severity: Minor
                                          Found in packages/babel-parser/src/parser/expression.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 base;
                                          Severity: Major
                                          Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                    return ret;
                                            Severity: Major
                                            Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                        return this.finishNode(node, "BindExpression");
                                              Severity: Major
                                              Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                        return id;
                                                Severity: Major
                                                Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                            return this.finishNode(node, "PipelinePrimaryTopicReference");
                                                  Severity: Major
                                                  Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                          return this.parseTaggedTemplateExpression(
                                                            startPos,
                                                            startLoc,
                                                            base,
                                                            state,
                                                    Severity: Major
                                                    Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                            return node;
                                                      Severity: Major
                                                      Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                                  return node;
                                                        Severity: Major
                                                        Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                  return this.finishNode(node, "NullLiteral");
                                                          Severity: Major
                                                          Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                    return this.finishNode(node, "TupleExpression");
                                                            Severity: Major
                                                            Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                      return this.finishNode(node, "ArrayExpression");
                                                              Severity: Major
                                                              Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                          return this.parseFunction(node, undefined, true);
                                                                Severity: Major
                                                                Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                          return node;
                                                                  Severity: Major
                                                                  Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                              return node;
                                                                    Severity: Major
                                                                    Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                              return ret;
                                                                      Severity: Major
                                                                      Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                                return this.parseClass(node, false);
                                                                        Severity: Major
                                                                        Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                                    return node;
                                                                          Severity: Major
                                                                          Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                    return this.finishNode(node, "DoExpression");
                                                                            Severity: Major
                                                                            Found in packages/babel-parser/src/parser/expression.js - About 30 mins to fix

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

                                                                                parseMetaProperty(
                                                                                  node: N.MetaProperty,
                                                                                  meta: N.Identifier,
                                                                                  propertyName: string,
                                                                                ): N.MetaProperty {
                                                                              Severity: Minor
                                                                              Found in packages/babel-parser/src/parser/expression.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 parsePropertyName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                              Open

                                                                                parsePropertyName(
                                                                                  prop: N.ObjectOrClassMember | N.ClassMember | N.TsNamedTypeElementBase,
                                                                                  isPrivateNameAllowed: boolean,
                                                                                ): N.Expression | N.Identifier {
                                                                                  if (this.eat(tt.bracketL)) {
                                                                              Severity: Minor
                                                                              Found in packages/babel-parser/src/parser/expression.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 checkGetterSetterParams has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                              Open

                                                                                checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void {
                                                                                  const paramCount = this.getGetterSetterExpectedParamCount(method);
                                                                                  const start = method.start;
                                                                                  if (method.params.length !== paramCount) {
                                                                                    if (method.kind === "get") {
                                                                              Severity: Minor
                                                                              Found in packages/babel-parser/src/parser/expression.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 parseExprListItem has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                              Open

                                                                                parseExprListItem(
                                                                                  allowEmpty: ?boolean,
                                                                                  refExpressionErrors?: ?ExpressionErrors,
                                                                                  refNeedsArrowPos: ?Pos,
                                                                                  allowPlaceholder: ?boolean,
                                                                              Severity: Minor
                                                                              Found in packages/babel-parser/src/parser/expression.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

                                                                                withTopicPermittingContext<T>(callback: () => T): T {
                                                                                  const outerContextTopicState = this.state.topicContext;
                                                                                  this.state.topicContext = {
                                                                                    // Enable the use of the primary topic reference.
                                                                                    maxNumOfResolvableTopics: 1,
                                                                              Severity: Major
                                                                              Found in packages/babel-parser/src/parser/expression.js and 1 other location - About 2 hrs to fix
                                                                              packages/babel-parser/src/parser/expression.js on lines 2446..2460

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

                                                                              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

                                                                                withTopicForbiddingContext<T>(callback: () => T): T {
                                                                                  const outerContextTopicState = this.state.topicContext;
                                                                                  this.state.topicContext = {
                                                                                    // Disable the use of the primary topic reference.
                                                                                    maxNumOfResolvableTopics: 0,
                                                                              Severity: Major
                                                                              Found in packages/babel-parser/src/parser/expression.js and 1 other location - About 2 hrs to fix
                                                                              packages/babel-parser/src/parser/expression.js on lines 2423..2437

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

                                                                              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 (this.state.inParameters) {
                                                                                    this.raise(node.start, Errors.AwaitExpressionFormalParameter);
                                                                                  } else if (this.state.awaitPos === -1) {
                                                                                    this.state.awaitPos = node.start;
                                                                                  }
                                                                              Severity: Major
                                                                              Found in packages/babel-parser/src/parser/expression.js and 1 other location - About 2 hrs to fix
                                                                              packages/babel-parser/src/parser/expression.js on lines 2292..2296

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

                                                                              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 (this.state.inParameters) {
                                                                                    this.raise(node.start, Errors.YieldInParameter);
                                                                                  } else if (this.state.yieldPos === -1) {
                                                                                    this.state.yieldPos = node.start;
                                                                                  }
                                                                              Severity: Major
                                                                              Found in packages/babel-parser/src/parser/expression.js and 1 other location - About 2 hrs to fix
                                                                              packages/babel-parser/src/parser/expression.js on lines 2248..2252

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

                                                                              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

                                                                                withSoloAwaitPermittingContext<T>(callback: () => T): T {
                                                                                  const outerContextSoloAwaitState = this.state.soloAwait;
                                                                                  this.state.soloAwait = true;
                                                                              
                                                                                  try {
                                                                              Severity: Major
                                                                              Found in packages/babel-parser/src/parser/expression.js and 1 other location - About 1 hr to fix
                                                                              packages/babel-parser/src/plugins/typescript/index.js on lines 1198..1206

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

                                                                                    if (isPattern) {
                                                                                      this.next();
                                                                                      // Don't use parseRestBinding() as we only allow Identifier here.
                                                                                      prop.argument = this.parseIdentifier();
                                                                                      this.checkCommaAfterRest(charCodes.rightCurlyBrace);
                                                                              Severity: Major
                                                                              Found in packages/babel-parser/src/parser/expression.js and 1 other location - About 1 hr to fix
                                                                              packages/babel-parser/src/plugins/jsx/index.js on lines 328..334

                                                                              Duplicated Code

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

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

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

                                                                              Tuning

                                                                              This issue has a mass of 62.

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

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

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

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

                                                                              Refactorings

                                                                              Further Reading

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

                                                                                  if (method.params.length !== paramCount) {
                                                                                    if (method.kind === "get") {
                                                                                      this.raise(start, Errors.BadGetterArity);
                                                                                    } else {
                                                                                      this.raise(start, Errors.BadSetterArity);
                                                                              Severity: Major
                                                                              Found in packages/babel-parser/src/parser/expression.js and 2 other locations - About 1 hr to fix
                                                                              packages/babel-parser/src/plugins/estree.js on lines 102..113
                                                                              packages/babel-parser/src/plugins/flow.js on lines 1185..1191

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

                                                                              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

                                                                                        !this.match(tt.parenL) &&
                                                                                        !this.match(tt.bracketL) &&
                                                                                        !this.match(tt.dot)
                                                                              Severity: Minor
                                                                              Found in packages/babel-parser/src/parser/expression.js and 1 other location - About 50 mins to fix
                                                                              packages/babel-parser/src/plugins/flow.js on lines 1200..1202

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

                                                                              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

                                                                                      this.match(tt.num) || this.match(tt.string) || this.match(tt.bigint)
                                                                                        ? this.parseExprAtom()
                                                                                        : this.parseMaybePrivateName(isPrivateNameAllowed);
                                                                              Severity: Minor
                                                                              Found in packages/babel-parser/src/parser/expression.js and 2 other locations - About 35 mins to fix
                                                                              packages/babel-parser/src/plugins/placeholders.js on lines 209..221
                                                                              packages/babel-parser/src/plugins/typescript/index.js on lines 1868..1887

                                                                              Duplicated Code

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

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

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

                                                                              Tuning

                                                                              This issue has a mass of 46.

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

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

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

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

                                                                              Refactorings

                                                                              Further Reading

                                                                              There are no issues that match your filters.

                                                                              Category
                                                                              Status