Showing 623 of 1,229 total issues
Function extend
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.extend = jQuery.fn.extend = function() {
var src, copyIsArray, copy, name, options, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
Function _getMemberCount
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Overview.prototype._getMemberCount = function(keys, last) {
var _collection, _command, _commands, _i, _key, _len;
if (last) {
if (this.memberRequests.remaining === 0) {
this._getTopMembers(null, null, true);
Function initProgram
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
initProgram: function(gl) {
var vertexShader,
fragmentShader,
program;
Function node
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function node() {
cloud = zmq.socket('sub');
ctl = zmq.socket('req');
output = zmq.socket('pub');
Function graph
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function graph(ctx, code) {
var tagsByLine = [], nbLines;
code = String(code).split('\n');
nbLines = code.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 value
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
value: function(predicate) {
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== '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 value
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
value: function(predicate) {
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== '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 value
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
value: function(predicate) {
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== '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 post
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function post(msg) {
function postMsg(type, body) {
for (var i = 0; i < MSG[type].flx.length; i++) {
setTimeout(post,0,MSG[type].flx[i](body));
- 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 linePoint
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function linePoint(x, y) {
x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x));
y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y));
var v = pointVisible(x, y);
if (polygon) ring.push([ x, y ]);
Function extent
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
brush.extent = function(z) {
var x0, x1, y0, y1, t;
if (!arguments.length) {
if (x) {
if (xExtentDomain) {
Function pack
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.layout.pack = function() {
var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;
function pack(d, i) {
var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() {
return radius;
Function onMove
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onMove(e) {
if (!self.settings('eventsEnabled'))
return;
nodes = getNodes(e);
Function router
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function router() {
cloud = zmq.socket('sub');
output = zmq.socket('pub');
ctl = zmq.socket('rep');
Function _moveHandler
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _moveHandler(e) {
var x,
y,
pos;
Function linePoint
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function linePoint(λ, φ) {
var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]);
if (p0) {
var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal);
d3_geo_cartesianNormalize(inflection);
Function d3_geo_pathContext
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_geo_pathContext(context) {
var pointRadius = 4.5;
var stream = {
point: point,
lineStart: function() {
Function each
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
each: function( obj, callback, args ) {
var value,
i = 0,
length = obj.length,
isArray = isArraylike( obj );
Function validateUserByEmail
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function validateUserByEmail(email) {
var user;
// use email address to find user
db.view('user', 'all', { key: email }, saveUserVerificationDetails);
Function EventBus
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function EventBus() {
var self = this;
self.subscribers = {}; //TODO use node-hashtable here for better perf
eventNames.forEach(function (name) {
self.subscribers[name] = {};