Function findLast
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
findLast: function (value) {
if (this.head === null) {
return 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 find
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
find: function (value) {
var node = this.head;
if (node !== null) {
if (value !== 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
File linked-list.js
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Collection from './collection';
import Iterator from '../iteration/iterator';
import LinkedListNode from './linked-list-node';
import forOf from '../utils/for-of';
import assertType from '../utils/assert-type';
Function remove
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
remove: 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 remove
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
remove: function (value) {
var node;
if (value instanceof LinkedListNode) {
node = value;
Function findLast
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
findLast: function (value) {
if (this.head === null) {
return null;
}
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 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"