Showing 1,896 of 2,859 total issues
Function RoundRobinHandle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function RoundRobinHandle(key, address, port, addressType, backlog, fd) {
Function pbkdf2
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
exports.pbkdf2 = function(password,
salt,
iterations,
keylen,
digest,
Function errorHandler
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Domain.prototype._errorHandler = function errorHandler(er) {
var caught = false;
// ignore errors on disposed domains.
//
// XXX This is a bit stupid. We should probably get rid of
- 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
Avoid deeply nested control flow statements. Open
if (!newpart.match(hostnamePartPattern)) {
var validParts = hostparts.slice(0, i);
var notHost = hostparts.slice(i + 1);
var bit = part.match(hostnamePartStart);
if (bit) {
Function pbkdf2
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function pbkdf2(password, salt, iterations, keylen, digest, callback) {
Function write
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
fs.write = function(fd, buffer, offset, length, position, callback) {
function strWrapper(err, written) {
// Retain a reference to buffer so that it can't be GC'ed too soon.
callback(err, written || 0, buffer);
}
- 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 _makeTimerTimeout
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function _makeTimerTimeout(timer) {
var domain = timer.domain;
var msecs = timer._idleTimeout;
// Timer has been unenrolled by another timer that fired at the same time,
- 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 ReadableState
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function ReadableState(options, stream) {
options = options || {};
// object stream flag. Used to make read(n) ignore n and to
// make all the buffer merging and length checks go away
- 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 detectIncompleteChar
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
StringDecoder.prototype.detectIncompleteChar = function(buffer) {
// determine how many bytes we have to check at the end of this buffer
var i = (buffer.length >= 3) ? 3 : buffer.length;
// Figure out if one of the last i bytes of our buffer announces an
- 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 read
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
fs.read = function(fd, buffer, offset, length, position, callback) {
Function writeAll
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function writeAll(fd, buffer, offset, length, position, callback) {
Avoid deeply nested control flow statements. Open
if (isNaN(stepcount) || stepcount <= 0) {
throw new Error('Invalid step count argument "' + args[0] + '".');
}
Avoid deeply nested control flow statements. Open
if (value.isString()) {
result += '"';
}
Function iteratePauses
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
PausePlot.prototype.iteratePauses = function (f) {
if (this.start < this.idx) {
for (var i = this.start; i < this.idx; i++) {
f.call(this, i - this.start, this.pauses[i]);
}
- 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 am1
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function am1(i,x,w,j,c,n) {
Avoid deeply nested control flow statements. Open
if (!current.right) {
break;
}
Avoid deeply nested control flow statements. Open
if (!current.right) {
break;
}
Function writeOrBuffer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function writeOrBuffer(stream, state, chunk, encoding, cb) {
chunk = decodeChunk(state, chunk, encoding);
if (util.isBuffer(chunk))
encoding = 'buffer';
var len = state.objectMode ? 1 : chunk.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
Avoid deeply nested control flow statements. Open
if (excType == 'unc') {
excType = 'uncaught';
}
Function am3
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function am3(i,x,w,j,c,n) {