Showing 1,896 of 2,859 total issues
Avoid deeply nested control flow statements. Open
if (r.source === '$') {
r.exec = sh_konquerorExec;
}
Avoid deeply nested control flow statements. Open
if (s) {
var lines = s.split(/\r\n|\n|\r/);
for (var i = 0, len = lines.length; i < len; i++) {
if (i > 0) {
this._line();
Avoid deeply nested control flow statements. Open
if (q < t) {
break;
}
Function send
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Socket.prototype.send = function(buffer,
offset,
length,
port,
address,
Function concat
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Buffer.concat = function(list, length) {
if (!util.isArray(list))
throw new TypeError('list argument must be an Array of Buffers.');
if (util.isUndefined(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
for (var j = 0, k = part.length; j < k; j++) {
if (part.charCodeAt(j) > 127) {
// we replace non-ASCII char with a temporary placeholder
// we need this to make sure size of hostname is not
// broken by replacing non-ASCII by nothing
Function setInterval
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
exports.setInterval = function(callback, repeat) {
repeat *= 1; // coalesce to number or NaN
if (!(repeat >= 1 && repeat <= TIMEOUT_MAX)) {
repeat = 1; // schedule on next tick, follows browser behaviour
- 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 SharedHandle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function SharedHandle(key, address, port, addressType, backlog, fd) {
Function write
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
fs.write = function(fd, buffer, offset, length, position, callback) {
Function checkInt
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function checkInt(buffer, value, offset, ext, max, min) {
Function _getServer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
cluster._getServer = function(obj, address, port, addressType, fd, cb) {
Function formatProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
Function sendto
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Socket.prototype.sendto = function(buffer,
offset,
length,
port,
address,
Function bind
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Socket.prototype.bind = function(port /*, address, callback*/) {
var self = this;
self._healthCheck();
- 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 (scriptId) {
ambiguous = true;
}
Function Server
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function Server(options, connectionListener) {
if (!(this instanceof Server))
return new Server(options, connectionListener);
events.EventEmitter.call(this);
- 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 renegotiate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
TLSSocket.prototype.renegotiate = function(options, callback) {
var requestCert = this._requestCert,
rejectUnauthorized = this._rejectUnauthorized;
if (typeof options.requestCert !== 'undefined')
- 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 connect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function connect(self, address, port, addressType, localAddress, localPort) {
Function trimArray
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function trimArray(arr) {
var lastIndex = arr.length - 1;
var start = 0;
for (; start <= lastIndex; start++) {
if (arr[start])
- 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 on
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Readable.prototype.on = function(ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
// If listening to data, and it has not explicitly been paused,
// then call resume to start the flow of data on the next tick.
- 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"