Showing 1,896 of 2,859 total issues
Function _read
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ReadStream.prototype._read = function(n) {
if (!util.isNumber(this.fd))
return this.once('open', function() {
this._read(n);
});
Function ReadStream
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ReadStream(path, options) {
if (!(this instanceof ReadStream))
return new ReadStream(path, options);
// a little bit bigger buffer and water marks by default
Function clearBuffer
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function clearBuffer(stream, state) {
state.bufferProcessing = true;
var entry = state.bufferedRequest;
if (stream._writev && entry && entry.next) {
Function isManaged
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function isManaged (target) {
return function predicate (path, cb) {
if (!path) {
log.verbose('isManaged', 'no path passed for target', target)
return cb(null, false)
Function completion
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
view.completion = function (opts, cb) {
if (opts.conf.argv.remain.length <= 2) {
// FIXME: there used to be registry completion here, but it stopped making
// sense somewhere around 50,000 packages on the registry
return cb()
Function loadPrefix
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function loadPrefix (cb) {
var cli = this.list[0]
Object.defineProperty(this, "prefix",
{ set : function (prefix) {
Function Main
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def Main():
parser = BuildOptions()
(options, args) = parser.parse_args()
if not ProcessOptions(options):
parser.print_help()
Function output
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var output = function(s, style) {
var length = s.length;
// this is more than just an optimization - we don't want to output empty <span></span> elements
if (length === 0) {
return;
Function _load
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Module._load = function(request, parent, isMain) {
if (parent) {
debug('Module._load REQUEST ' + (request) + ' parent: ' + parent.id);
}
Function sh_insertTags
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sh_insertTags(tags, text) {
var doc = document;
var result = document.createDocumentFragment();
var tagIndex = 0;
Function unpipe
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Readable.prototype.unpipe = function(dest) {
var state = this._readableState;
// if we're not piping anywhere, then do nothing.
if (state.pipesCount === 0)
Function parserOnHeadersComplete
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parserOnHeadersComplete(info) {
debug('parserOnHeadersComplete', info);
var parser = this;
var headers = info.headers;
var url = info.url;
Function format
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.format = function(f) {
if (!isString(f)) {
var objects = [];
for (var i = 0; i < arguments.length; i++) {
objects.push(inspect(arguments[i]));
Function formatObject_
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function formatObject_(value, include_properties) {
var result = '';
result += formatHandleReference_(value);
result += ', type: object';
result += ', constructor ';
Function _run
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Benchmark.prototype._run = function() {
if (this.config)
return this.fn(this.config);
// one more more options weren't set.
Function TLSSocket
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function TLSSocket(socket, options) {
// Disallow wrapping TLSSocket in TLSSocket
assert(!(socket instanceof TLSSocket));
net.Socket.call(this, {
Function addNameRange
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addNameRange (name, range, data, cb) {
range = semver.validRange(range, true)
if (range === null) return cb(new Error(
"Invalid version range: " + range
))
Function get
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Object.defineProperty(npm.commands, c, { get : function () {
if (!loaded) throw new Error(
"Call npm.load(config, cb) before using this command.\n"+
"See the README.md or cli.js for example usage.")
var a = npm.deref(c)
Function installManyTop_
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function installManyTop_ (what, where, context, cb) {
var nm = path.resolve(where, "node_modules")
fs.readdir(nm, function (er, pkgs) {
if (er) return installMany(what, where, context, cb)
Consider simplifying this complex logical expression. Open
Open
if (cb) {
this._reqCallbacks.splice(index, 1);
handled = true;
var err = res.success === false && (res.message || true) ||