Showing 1,896 of 2,859 total issues
Function server
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function server() {
var serverHandle = new TCP();
var err = serverHandle.bind('127.0.0.1', PORT);
if (err)
fail(err, 'bind');
Function addLocalDirectory
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addLocalDirectory (p, pkgData, shasum, cb) {
assert(pkgData, "must pass package data")
assert(typeof cb === "function", "must have callback")
// if it's a folder, then read the package.json,
Function load
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function load (npm, cli, cb) {
which(process.argv[0], function (er, node) {
if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose("node symlink", node)
process.execPath = node
Function WriteTarget
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
options, generator_flags, all_qualified_targets, output):
# The make generator does this always.
# TODO: It would be nice to be able to tell CMake all dependencies.
Consider simplifying this complex logical expression. Open
if (is_last_code_in_line and
self._StatementCouldEndInContext() and
not is_multiline_string and
not is_end_of_block and
not is_continued_identifier and
MacTool
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class MacTool(object):
"""This class performs all the Mac tooling steps. The methods can either be
executed directly, or dispatched from an argument list."""
def Dispatch(self, args):
Function bind
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Socket.prototype.bind = function(port /*, address, callback*/) {
var self = this;
self._healthCheck();
Function runBlock1
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock1() {
for (var i = 0; i < 81; i++) {
re8.exec(s26[i]);
}
for (var i = 0; i < 78; i++) {
Function runBlock2
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runBlock2() {
for (var i = 0; i < 40; i++) {
s57a[i].replace(re14, '');
s57a[i].replace(re15, '');
}
Function helpCommand_
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
DebugRequest.prototype.helpCommand_ = function(args) {
// Help os quite simple.
if (args && args.length > 0) {
print('warning: arguments to \'help\' are ignored');
}
Function getLite
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getLite (data, noname) {
var lite = {}
, maxDepth = npm.config.get("depth")
if (!noname && data.name) lite.name = data.name
Function save
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Conf.prototype.save = function (where, cb) {
var target = this.sources[where]
if (!target || !(target.path || target.source) || !target.data) {
if (where !== "builtin")
var er = new Error("bad save target: " + where)
File run_benchmarks_test.py
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Function Buffer
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Buffer(subject, encoding) {
if (!util.isBuffer(this))
return new Buffer(subject, encoding);
if (util.isNumber(subject)) {
Function trySpawn
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Interface.prototype.trySpawn = function(cb) {
var self = this,
breakpoints = this.breakpoints || [],
port = exports.port,
host = 'localhost',
- 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 removeAllListeners
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function removeAllListeners(type) {
var key, listeners;
if (!this._events)
return 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 writeHead
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
ServerResponse.prototype.writeHead = function(statusCode, reason, obj) {
var headers;
if (util.isString(reason)) {
// writeHead(statusCode, reasonPhrase[, headers])
- 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 format
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
exports.format = function(f) {
if (!isString(f)) {
var objects = [];
for (var i = 0; i < arguments.length; i++) {
objects.push(inspect(arguments[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"
Further reading
Function readFile
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
fs.readFile = function(path, options, callback_) {
var callback = maybeCallback(arguments[arguments.length - 1]);
if (util.isFunction(options) || !options) {
options = { encoding: null, flag: 'r' };
- 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 pipe
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Readable.prototype.pipe = function(dest, pipeOpts) {
var src = this;
var state = this._readableState;
switch (state.pipesCount) {
- 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"