Showing 51 of 95 total issues
Function SpelExpressionParser
has a Cognitive Complexity of 323 (exceeds 5 allowed). Consider refactoring. Open
export var SpelExpressionParser = function () {
var VALID_QUALIFIED_ID_PATTERN = new RegExp('[\\p{L}\\p{N}_$]+');
- Read upRead up
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 tokenize
has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring. Open
function tokenize(inputData) {
var expressionString = inputData,
toProcess = inputData + '\0',
max = toProcess.length,
pos = 0,
- Read upRead up
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 SpelExpressionParser
has 738 lines of code (exceeds 25 allowed). Consider refactoring. Open
export var SpelExpressionParser = function () {
var VALID_QUALIFIED_ID_PATTERN = new RegExp('[\\p{L}\\p{N}_$]+');
Function tokenize
has 464 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tokenize(inputData) {
var expressionString = inputData,
toProcess = inputData + '\0',
max = toProcess.length,
pos = 0,
File SpelExpressionParser.js
has 784 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
File Tokenizer.js
has 495 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Function process
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
function process() {
var ch;
while (pos < max) {
ch = toProcess[pos];
Function lexNumericLiteral
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lexNumericLiteral(firstCharIsZero) {
var isReal = false,
start = pos,
ch = toProcess[pos + 1],
isHex = ch === 'x' || ch === 'X',
Function createNode
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function createNode(nullSafeNavigation, methodName, position, args) {
var node = SpelNode.create('method', position);
node.getRaw = function () {
return {
- Read upRead up
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 createSpelNode
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createSpelNode(nodeType, position, ...operands) {
var node = {},
type = nodeType || 'Abstract',
children = [],
parent = null,
Function createNode
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createNode(nullSafeNavigation, methodName, position, args) {
var node = SpelNode.create('method', position);
node.getRaw = function () {
return {
Function createNode
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function createNode(nullSafeNavigation, propertyName, position) {
var node = SpelNode.create('property', position);
node.getRaw = function () {
return propertyName;
- Read upRead up
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 16 (exceeds 5 allowed). Consider refactoring. Open
function createNode(position, dimensions, nodes) {
var isArray = nodes !== undefined;
var dimension;
if (isArray) {
dimension = dimensions.length && dimensions[0] && dimensions[0].getType() === 'number' ? dimensions[0].getValue() : null;
- Read upRead up
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 maybeEatInlineListOrMap
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function maybeEatInlineListOrMap() {
var token = peekToken(),
listElements = [];
if (!peekTokenConsumeIfMatched(TokenKind.LCURLY, true)) {
Function getValue
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
node.getValue = function (state) {
var context = state.activeContext.peek(),
compiledArgs = [],
method;
Function createNode
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createNode(nullSafeNavigation, propertyName, position) {
var node = SpelNode.create('property', position);
node.getRaw = function () {
return propertyName;
Function createNode
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createNode(position, expressionComponents) {
var node = SpelNode.create.apply(null, ['compound', position].concat(expressionComponents));
function buildContextStack(state) {
var childrenCount = node.getChildren().length,
Function selectFromMap
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function selectFromMap(collection, whichElement, expr, state) {
var newCollection = {},
entry,
key,
entries = [],
Function eatRelationalExpression
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function eatRelationalExpression() {
var expr = eatSumExpression();
var relationalOperatorToken = maybeEatRelationalOperator();
if (relationalOperatorToken !== null) {
var token = nextToken(); // consume relational operator token
Function createNode
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createNode(position, dimensions, nodes) {
var isArray = nodes !== undefined;
var dimension;
if (isArray) {
dimension = dimensions.length && dimensions[0] && dimensions[0].getType() === 'number' ? dimensions[0].getValue() : null;