Showing 109 of 109 total issues
Avoid too many return
statements within this function. Open
return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
Avoid too many return
statements within this function. Open
return compute31BitObjecHash(obj, strict);
Function setEquals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setEquals: function (other) {
assertNotNull(other);
if (areEqualityComparersEqual(this, other)) {
if (this.count() !== other.count()) {
- 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 entries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
entries: function (keysOnly) {
var arr = new Array(this.count()),
slot = null,
index = 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 addLast
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
addLast: function (value) {
var node;
if (value instanceof LinkedListNode) {
node = value;
- 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 from
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
from: function (value) {
if (value === null || value === undefined || value === defaultComparer) {
return defaultComparer;
}
- 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 Dictionary
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function Dictionary(value, comparer) {
var dic = isType(value, Dictionary) ? value : null,
cmp = EqualityComparer.from(dic ? comparer : value),
table = new HashTable(cmp, dic ? dic.count() : (isNumber(value) ? value : 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 addFirst
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
addFirst: function (value) {
var node;
if (value instanceof LinkedListNode) {
node = value;
- 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 computeObjectEquals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function computeObjectEquals(objA, objB) {
// Objects having different hash code are not equal
// also prevents mutually recursive structures to stack overflow
if (hash(objA) !== hash(objB)) {
return false;
- 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"