Showing 623 of 1,229 total issues
Function send
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function( headers, complete ) {
// Get a new xhr
var handle, i,
xhr = s.xhr();
Function generateViews
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Overview.prototype.generateViews = function () {
var _conReading, _keystream;
_keystream = fs.createReadStream(this.options.keyfilename);
this.emit('initStatusUpdate', 'Started reading the keys from local file, requesting information about the key from redis and packing these information.');
_conReading = function (_this) {
Function generateViews
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Overview.prototype.generateViews = function() {
var _conReading, _keystream;
_keystream = fs.createReadStream(this.options.keyfilename);
this.emit('initStatusUpdate', "Started reading the keys from local file, requesting information about the key from redis and packing these information.");
_conReading = (function(_this) {
Function rescale
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.middlewares.rescale = function(readPrefix, writePrefix, options) {
var i,
l,
a,
b,
Function start
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function start(tree) {
// Get the app.get nodes
return tree.nodes.filter(h.customFinder({
name: "app.get",
Function resolution
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
Open
function resolution(graphParts) {
var _contexts = {};
for (var i = 0; i < graphParts.length; 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 bindCaptor
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bindCaptor(captor) {
var nodes,
over = {};
function onClick(e) {
Function data
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3_selectionPrototype.data = function(value, key) {
var i = -1, n = this.length, group, node;
if (!arguments.length) {
value = new Array(n = (group = this[0]).length);
while (++i < n) {
Function camera
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.misc.animation.camera = function(camera, val, options) {
if (
!(camera instanceof sigma.classes.camera) ||
typeof val !== 'object' ||
!val
Function exports
has a Cognitive Complexity of 22 (exceeds 5 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);
- 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 Sizzle
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function d3_geo_resample
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_geo_resample(project) {
var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;
function resample(stream) {
return (maxDepth ? resampleRecursive : resampleNone)(stream);
}
Function albersUsa
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geo.albersUsa = function() {
var lower48 = d3.geo.albers();
var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);
var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);
var point, pointStream = {
File sigma.captors.touch.js
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
;(function(undefined) {
'use strict';
if (typeof sigma === 'undefined')
throw 'sigma is not declared';
Function d3_locale_numberFormat
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_locale_numberFormat(locale) {
var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping ? function(value) {
var i = value.length, t = [], j = 0, g = locale_grouping[0];
while (i > 0 && g > 0) {
t.push(value.substring(i -= g, i + g));
Function d3_scale_ordinal
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_scale_ordinal(domain, ranger) {
var index, range, rangeBand;
function scale(x) {
return range[((index.get(x) || (ranger.t === "range" ? index.set(x, domain.push(x)) : NaN)) - 1) % range.length];
}
Function buildFragment
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildFragment: function( elems, context, scripts, selection ) {
var j, elem, contains,
tmp, tag, tbody, wrap,
l = elems.length,
Function MRModel
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function MRModel(name, schema, opts) {
opts = opts || {};
/**
* is overriden for liveQueries
Function liveQuery
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
liveQuery: function(clientQuery, LQIndex) {
if (!opts.checkPermission(this, 'R')) {
return new Error('You lack a privilege to read this collection');
}
def = Promise.defer();
Function processFileList
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processFileList(e, files, opts) {
var filesLeft = files.length;
var group = {
groupID: getGroupID(),