Showing 1,896 of 2,859 total issues
Function parseField
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseField (f, k) {
if (typeof f !== "string" && !(f instanceof String))
return f
// type can be an array or single thing.
Function createWritableStdioStream
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createWritableStdioStream(fd) {
var stream;
var tty_wrap = process.binding('tty_wrap');
// Note stream._type is used for test-module-load-list.js
Function createSocket
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Agent.prototype.createSocket = function(req, options) {
var self = this;
options = util._extend({}, options);
options = util._extend(options, self.options);
Function pipe
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.pipe = function pipe(pair, socket) {
pair.encrypted.pipe(socket);
socket.pipe(pair.encrypted);
pair.encrypted.on('close', function() {
Function run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function run() {
if (--r < 0)
return compare();
toggle = ++toggle % 2;
Function sc_toWriteCircleString
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sc_Pair.prototype.sc_toWriteCircleString = function(symb, inList) {
if (this[symb + "use"]) { // use-flag is set. Just use it.
var nb = this[symb + "nb"];
if (this[symb]-- === 0) { // if we are the last use. remove all fields.
delete this[symb];
Function installedDeep
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function installedDeep (opts, cb) {
var local
, global
, depth = npm.config.get("depth")
, opt = { depth: depth, dev: true }
Function updateDeps
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateDeps (er, d) {
if (er) {
if (parsed.type !== 'local') return cb()
return updateLocalDeps()
}
Function rmMans
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function rmMans (pkg, folder, parent, top, cb) {
if (!pkg.man
|| !top
|| process.platform === "win32"
|| !npm.config.get("global")) {
Function save
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function save (c, u, cb) {
npm.spinner.start()
// save existing configs, but yank off for this PUT
var uri = npm.config.get("registry")
Function X
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, function X (er) {
if (er) return cb(er)
// before continuing to installing dependencies, check for a shrinkwrap.
var opt = { dev: npm.config.get("dev") }
Function processSignalHandlers
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
startup.processSignalHandlers = function() {
// Load events module in order to access prototype elements on process like
// process.addListener.
var signalWraps = {};
var addListener = process.addListener;
Function clearBreakpoint
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Interface.prototype.clearBreakpoint = function(script, line) {
if (!this.requireConnection()) return;
var ambiguous,
breakpoint,
Function readableAddChunk
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function readableAddChunk(stream, state, chunk, encoding, addToFront) {
var er = chunkInvalid(state, chunk);
if (er) {
stream.emit('error', er);
} else if (chunk === null) {
Function bnpFromString
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bnpFromString(s,b) {
var this_array = this.array;
var k;
if(b == 16) k = 4;
else if(b == 8) k = 3;
Function filterInstalled
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function filterInstalled (local, global, filter, cb) {
var fl
, fg
if (!filter) {
Function completion
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
install.completion = function (opts, cb) {
// install can complete to a folder with a package.json, or any package.
// if it has a slash, then it's gotta be a folder
// if it starts with https?://, then just give up, because it's a url
if (/^https?:\/\//.test(opts.partialWord)) {
Function GenerateOutputForConfig
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def GenerateOutputForConfig(target_list, target_dicts, data, params,
config_name):
options = params['options']
flavor = gyp.common.GetFlavor(params)
generator_flags = params.get('generator_flags', {})
Function execute
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
Protocol.prototype.execute = function(d) {
var res = this.res;
res.raw += d;
switch (this.state) {
- 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 sh_mergeTags
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
function sh_mergeTags(originalTags, highlightTags) {
var numOriginalTags = originalTags.length;
if (numOriginalTags === 0) {
return highlightTags;
}
- 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"