Showing 1,896 of 2,859 total issues
Function emit
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
EventEmitter.prototype.emit = function emit(type) {
var er, handler, len, args, i, listeners;
if (!this._events)
this._events = {};
Function prettify
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prettify (data, args) {
var searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase()
, sortField = searchsort.replace(/^\-+/, "")
, searchRev = searchsort.charAt(0) === "-"
, truncate = !npm.config.get("long")
AndroidMkWriter
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class AndroidMkWriter(object):
"""AndroidMkWriter packages up the writing of one target-specific Android.mk.
Its only real entry point is Write(), and is mostly used for namespacing.
"""
Map
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Map(HeapObject):
def Decode(self, offset, size, value):
return (value >> offset) & ((1 << size) - 1)
# Instance Sizes
Function _send
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
target._send = function(message, handle, swallowErrors) {
assert(this.connected || this._channel);
if (util.isUndefined(message))
throw new TypeError('message cannot be undefined');
Function pipe
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Stream.prototype.pipe = function(dest, options) {
var source = this;
function ondata(chunk) {
if (dest.writable) {
Function listen
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Server.prototype.listen = function() {
var self = this;
var lastArg = arguments[arguments.length - 1];
if (util.isFunction(lastArg)) {
File view.js
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
// npm view [pkg [pkg ...]]
module.exports = view
view.usage = "npm view pkg[@version] [<field>[.subfield]...]"
Function decode
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function decode(input) {
// Don't use UCS-2
var output = [],
inputLength = input.length,
out,
Function Agent
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Agent(options) {
if (!(this instanceof Agent))
return new Agent(options);
EventEmitter.call(this);
Function Stringify
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Stringify(x, depth) {
if (depth === undefined)
depth = stringifyDepthLimit;
else if (depth === 0)
return "*";
Function write
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
OutgoingMessage.prototype.write = function(chunk, encoding, callback) {
var self = this;
if (this.finished) {
var err = new Error('write after end');
Function resolver
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function resolver (what, cb) {
if (resolveLeft) return setTimeout(function () {
resolver(what, cb)
}, to++)
Function objEquiv
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function objEquiv(a, b) {
if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))
return false;
// an identical 'prototype' property.
if (a.prototype !== b.prototype) 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"
Further reading
Function send
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Socket.prototype.send = function(buffer,
offset,
length,
port,
address,
- 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 a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
ReadStream.prototype._read = function(n) {
if (!util.isNumber(this.fd))
return this.once('open', function() {
this._read(n);
});
- 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 SecurePair
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function SecurePair(context, isServer, requestCert, rejectUnauthorized,
options) {
if (!(this instanceof SecurePair)) {
return new SecurePair(context,
isServer,
- 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 breakCommandToJSONRequest_
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
DebugRequest.prototype.breakCommandToJSONRequest_ = function(args) {
// Build a evaluate request from the text command.
// Process arguments if any.
if (args && args.length > 0) {
var target = args;
- 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 client
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function client() {
var chunk;
switch (type) {
case 'buf':
chunk = new Buffer(len);
- 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 bnIsProbablePrime
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function bnIsProbablePrime(t) {
var i, x = this.abs();
var x_array = x.array;
if(x.t == 1 && x_array[0] <= lowprimes[lowprimes.length-1]) {
for(i = 0; i < lowprimes.length; ++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"