Showing 71 of 138 total issues
Avoid too many return
statements within this function. Open
return currentNode;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return result;
Avoid too many return
statements within this function. Open
return currentNode;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Function addFunction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
addFunction(aliases, executor, argumentCount = 1, nonSimplifiable = false, calculateForNaNs = false) {
var currentFunctionDefinition = {};
currentFunctionDefinition.id = this.extractIdFromAliases(aliases);
currentFunctionDefinition.aliases = aliases;
- 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 clearCachedValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
clearCachedValues(treeNode) {
if (treeNode instanceof Text) {
treeNode = treeNode.tree.root;
}
- 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 constructor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor(...listsToJoin) {
this.clear();
// Join input argument lists if any arguments were passed.
if (listsToJoin.length) {
- 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 cloneWithCorrectedType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
cloneWithCorrectedType() {
var clone = _.clone(this);
// Substitution of a type for error tokens
if (clone.isErrorToken()) {
- 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"