Showing 1,896 of 2,859 total issues
File progress.py
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright 2012 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
Function write
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
CryptoStream.prototype._write = function write(data, encoding, cb) {
assert(util.isNull(this._pending));
// Black-hole data
if (!this.pair.ssl) return cb(null);
Function client
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function client() {
var chunk;
switch (type) {
case 'buf':
chunk = new Buffer(len);
Function bnModPow
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bnModPow(e,m) {
var e_array = e.array;
var i = e.bitLength(), k, r = nbv(1), z;
if(i <= 0) return r;
else if(i < 18) k = 1;
Function publish_
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function publish_ (arg, data, isRetry, cachedir, cb) {
if (!data) return cb(new Error("no package.json file found"))
var mappedConfig = getPublishConfig(
data.publishConfig,
Function runCmd_
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
function cb (er) {
cb_.apply(null, arguments)
log.resume()
File config.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module.exports = config
config.usage = "npm config set <key> <value>"
+ "\nnpm config get [<key>]"
Function main
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function main(conf) {
dur = +conf.dur;
type = conf.type;
size = +conf.size;
Function main
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function main(conf) {
var dur = +conf.dur;
var len = +conf.bytes;
var encoding;
Function andBuildResolvedTree
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function andBuildResolvedTree (er, current) {
if (er) return cb(er)
// each target will be a data object corresponding
// to a package, folder, or whatever that is in the cache now.
Function getCredentialsByURI
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getCredentialsByURI (uri) {
assert(uri && typeof uri === "string", "registry URL is required")
var nerfed = toNerfDart(uri)
var defnerf = toNerfDart(this.get("registry"))
Consider simplifying this complex logical expression. Open
Open
if ext in ('cc', 'cpp', 'cxx'):
command = 'cxx'
self.uses_cpp = True
elif ext == 'c' or (ext == 'S' and self.flavor != 'win'):
command = 'cc'
Function resolve
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
win32.resolve = function() {
var resolvedDevice = '',
resolvedTail = '',
resolvedAbsolute = false;
Function onconnection
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
serverHandle.onconnection = function(err, clientHandle) {
if (err)
fail(err, 'connect');
var chunk;
Function printStatistics
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
TickProcessor.prototype.printStatistics = function() {
print('Statistical profiling result from ' + this.lastLogFileName_ +
', (' + this.ticks_.total +
' ticks, ' + this.ticks_.unaccounted + ' unaccounted, ' +
this.ticks_.excluded + ' excluded).');
Function readString
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function readString() {
res = "";
while (true) {
var c = port.readChar();
switch (c) {
Function mutate_
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mutate_ (er, u) {
if (!er && user && (!u || u.error)) er = new Error(
"Couldn't get user data for " + user + ": " + JSON.stringify(u))
if (er) {
Function updateIndex
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateIndex (staleness, cb) {
assert(typeof cb === 'function', 'must pass callback to updateIndex')
mapToRegistry('-/all', npm.config, function (er, uri, auth) {
if (er) return cb(er)
Function splay_
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SplayTree.prototype.splay_ = function(key) {
if (this.isEmpty()) {
return;
}
// Create a dummy node. The use of the dummy node is a bit
Function splay_
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SplayTree.prototype.splay_ = function(key) {
if (this.isEmpty()) {
return;
}
// Create a dummy node. The use of the dummy node is a bit