Showing 623 of 1,229 total issues
File sigma.classes.quad.js
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
;(function(undefined) {
'use strict';
/**
* Sigma Quadtree Module
Function syncLogic
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var syncLogic = function() {
var cQindex = LQ.getIndexById(doc._id); //index of current doc in the query
if (evName === 'remove' && LQ.docs[cQindex]) {
File filereader.js
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
FileReader.js - v0.9
A lightweight wrapper for common FileReader usage.
Copyright 2012 Brian Grinstead - MIT License.
See http://github.com/bgrins/filereader.js for documentation.
Function dsv
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.dsv = function(delimiter, mimeType) {
var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
function dsv(url, row, callback) {
if (arguments.length < 3) callback = row, row = null;
var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);
File dependency.js
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module.exports = {
walk: walk,
types: _types,
hash: _hash,
builders: {
Function graph
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
function graph(type, options) {
this._options = options;
this._output_pre = _bgraph + "\\begin{" + type + "}";
this._output_post = "\\end{" + type + "}\n"+ _egraph;
this._plots = [];
- 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 defaultPrefilter
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultPrefilter( elem, props, opts ) {
/*jshint validthis:true */
var prop, index, length,
value, dataShow, toggle,
tween, hooks, oldfire,
Function sigma
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var sigma = function(conf) {
// Local variables:
// ****************
var i,
l,
Function d3_geo_clipCircle
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_geo_clipCircle(radius) {
var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -π, radius - π ]);
function visible(λ, φ) {
return Math.cos(λ) * Math.cos(φ) > cr;
Function exports
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (mongoose, connString) {
if (connString) {
mongoose.connect(connString, function (err) {
// if we failed to connect, abort
Function d3_geo_clip
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {
return function(rotate, listener) {
var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);
var clip = {
point: point,
Function exports
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Function exports
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(options) {
var cipher = encryptor(options.encryptionSecret);
return function(req, res, next) {
var userSession = getUserSession(req, options.sessionSyncNonce);
Function render
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function(gl, program, data, params) {
var buffer;
// Define attributes:
var colorLocation =
Function remove
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function(node) {
if (node.N) node.N.P = node.P;
if (node.P) node.P.N = node.N;
node.N = node.P = null;
var parent = node.U, sibling, left = node.L, right = node.R, next, red;
Function exports
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports = module.exports = function(options) {
var config = merge({
rules: {},
parameters: []
}, options)
Function trigger
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
trigger: function( event, data, elem, onlyHandlers ) {
var handle, ontype, cur,
bubbleType, special, tmp, i,
eventPath = [ elem || document ],
type = core_hasOwn.call( event, "type" ) ? event.type : event,
Function _next
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _next(tree, chain, node) {
// TODO What about building this fucking _next function so I don't have to pass these tree and chain as arguments every fucking time !
// console.log(">> ", node, node.kind);
Function Animation
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
Function serve
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.serve = function(options) {
/* configure options */
for (var key in options) {
value = options[key];