benmarch/spel2js

View on GitHub

Showing 95 of 95 total issues

Avoid too many return statements within this function.
Open

        return null;
Severity: Major
Found in src/SpelExpressionParser.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return pop();
    Severity: Major
    Found in src/SpelExpressionParser.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return pop();
      Severity: Major
      Found in src/SpelExpressionParser.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return null;
        Severity: Major
        Found in src/ast/Selection.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return null;
          Severity: Major
          Found in src/ast/MethodReference.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return OpDec.create(toPosToken(token), false, expr);
            Severity: Major
            Found in src/SpelExpressionParser.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return OpBetween.create(toPosToken(token), expr, rhExpr);
              Severity: Major
              Found in src/SpelExpressionParser.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return eatPrimaryExpression();
                Severity: Major
                Found in src/SpelExpressionParser.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return method.apply(context, compiledArgs);
                  Severity: Major
                  Found in src/ast/MethodReference.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return OpNE.create(pos, expr, rhExpr);
                    Severity: Major
                    Found in src/SpelExpressionParser.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return OpInstanceof.create(toPosToken(token), expr, rhExpr);
                      Severity: Major
                      Found in src/SpelExpressionParser.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return token.asBetweenToken();
                        Severity: Major
                        Found in src/SpelExpressionParser.js - About 30 mins to fix

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

                          function createNode(position, expressionComponents) {
                              var node = SpelNode.create.apply(null, ['indexer', position].concat(expressionComponents));
                          
                              node.getValue = function (state) {
                                  var activeContext = state.activeContext,
                          Severity: Minor
                          Found in src/ast/Indexer.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 createNode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function createNode(variableName, position) {
                              var node = SpelNode.create('variable', position);
                          
                              node.getRaw = function () {
                                  return variableName;
                          Severity: Minor
                          Found in src/ast/VariableReference.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 createNode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function createNode(nullSafeNavigation, whichElement, position, expr) {
                              var node = SpelNode.create('selection', position, expr);
                          
                              node.getValue = function (state) {
                                  var collection = state.activeContext.peek();
                          Severity: Minor
                          Found in src/ast/Selection.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

                          Severity
                          Category
                          Status
                          Source
                          Language