Showing 1,896 of 2,859 total issues
Function bnpAddTo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function bnpAddTo(a,r) {
var this_array = this.array;
var a_array = a.array;
var r_array = r.array;
var i = 0, c = 0, m = Math.min(a.t,this.t);
Function bnpSubTo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function bnpSubTo(a,r) {
var this_array = this.array;
var r_array = r.array;
var a_array = a.array;
var i = 0, c = 0, m = Math.min(a.t,this.t);
Function project
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function project(u, v, p, div)
{
var h = -0.5 / Math.sqrt(width * height);
for (var j = 1 ; j <= height; j++ ) {
var row = j * rowSize;
Function findPlotRange
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.findPlotRange = function(
range_start_override, range_end_override, result_callback) {
var start_found = (range_start_override || range_start_override == 0);
var end_found = (range_end_override || range_end_override == 0);
range_start = start_found ? range_start_override : Infinity;
Function version
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function version (args, silent, cb_) {
if (typeof cb_ !== "function") cb_ = silent, silent = false
if (args.length > 1) return cb_(version.usage)
var packagePath = path.join(npm.localPrefix, "package.json")
Function resolveHead
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolveHead (from, cloneURL, treeish, cachedRemote, cb) {
log.verbose('resolveHead', from, 'original treeish:', treeish)
var args = ['rev-list', '-n1', treeish]
git.whichAndExec(
args,
Function whoami
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function whoami (args, silent, cb) {
// FIXME: need tighter checking on this, but is a breaking change
if (typeof cb !== "function") {
cb = silent
silent = false
Function defineDefaultCommands
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function defineDefaultCommands(repl) {
// TODO remove me after 0.3.x
repl.defineCommand('break', {
help: 'Sometimes you get stuck, this gets you out',
action: function() {
- 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 _getDisplayPos
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Interface.prototype._getDisplayPos = function(str) {
var offset = 0;
var col = this.columns;
var row = 0;
var code;
- 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_load
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function sh_load(language, element, prefix, suffix) {
if (language in sh_requests) {
sh_requests[language].push(element);
return;
}
- 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 emitKeypressEvents
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function emitKeypressEvents(stream) {
if (stream._keypressDecoder) return;
var StringDecoder = require('string_decoder').StringDecoder; // lazy load
stream._keypressDecoder = new StringDecoder('utf8');
- 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 parseCertString
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
exports.parseCertString = function parseCertString(s) {
var out = {};
var parts = s.split('\n');
for (var i = 0, len = parts.length; i < len; i++) {
var sepIndex = parts[i].indexOf('=');
- 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 WriteStream
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function WriteStream(path, options) {
if (!(this instanceof WriteStream))
return new WriteStream(path, options);
options = options || {};
- 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 error
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
SecurePair.prototype.error = function(returnOnly) {
var err = this.ssl.error;
this.ssl.error = null;
if (!this._secureEstablished) {
- 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 _transform
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Zlib.prototype._transform = function(chunk, encoding, cb) {
var flushFlag;
var ws = this._writableState;
var ending = ws.ending || ws.ended;
var last = ending && (!chunk || ws.length === chunk.length);
- 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 unrefTimeout
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function unrefTimeout() {
var now = Timer.now();
debug('unrefTimer fired');
- 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 toString
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Buffer.prototype.toString = function(encoding, start, end) {
var loweredCase = false;
start = start >>> 0;
end = util.isUndefined(end) || end === Infinity ? this.length : end >>> 0;
- 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 requestOCSP
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function requestOCSP(self, hello, ctx, cb) {
if (!hello.OCSPRequest || !self.server)
return cb(null);
if (!ctx)
- 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 storeHeader
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function storeHeader(self, state, field, value) {
// Protect against response splitting. The if statement is there to
// minimize the performance impact in the common case.
if (/[\r\n]/.test(value))
value = value.replace(/[\r\n]+[ \t]*/g, '');
- 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 DebugRequest
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function DebugRequest(cmd_line) {
// If the very first character is a { assume that a JSON request have been
// entered as a command. Converting that to a JSON request is trivial.
if (cmd_line && cmd_line.length > 0 && cmd_line.charAt(0) == '{') {
this.request_ = cmd_line;
- 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"