Showing 623 of 1,229 total issues
Function slide
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
Function _createOverview
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Overview.prototype._createOverview = function () {
var type, val, _ref;
this._templateDataParsed = this._parseDataForTemplate();
_ref = this._typePlurals;
for (type in _ref) {
Function toContext
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
sigma.canvas.edges.toContext = function(e, s, t, ctx, settings) {
var p = settings('prefix') || '',
edgeColor = settings('edgeColor'),
defaultNodeColor = settings('defaultNodeColor'),
defaultEdgeColor = settings('defaultEdgeColor'),
Function _maper
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _maper() {
function map(n, it) {
if (it.enter)
Function histogram
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.layout.histogram = function() {
var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
function histogram(data, i) {
var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
while (++i < m) {
Function __resolve
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function __resolve(tree, forest) {
console.log(">> in ", tree.name);
for (var i = 0; i < tree.dep.length; i++) {
Function toNode
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
sigma.canvas.edges.toNode = function(e, s, t, ctx, settings) {
var p = settings('prefix') || '',
edgeColor = settings('edgeColor'),
defaultNodeColor = settings('defaultNodeColor'),
defaultEdgeColor = settings('defaultEdgeColor'),
Function initProgram
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
initProgram: function(gl) {
var vertexShader,
fragmentShader,
program;
Function resampleLineTo
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {
Function depTree
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function depTree() {
var graphs = [];
for (var i in 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 EventBus
has a Cognitive Complexity of 14 (exceeds 5 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] = {};
- 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 ASCIIgraph
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function ASCIIgraph(name, mean, median, min, max, length) {
mean = Math.floor(mean);
median = Math.floor(median);
min = Math.floor(min);
- 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 parseRows
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
dsv.parseRows = function(text, f) {
var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
function token() {
if (I >= N) return EOF;
if (eol) return eol = false, EOL;
Function point
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
point: function(λ, φ) {
var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;
if (!point0 && (v00 = v0 = v)) listener.lineStart();
if (v !== v0) {
point2 = intersect(point0, point1);
Function d3_svg_line
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_svg_line(projection) {
var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
function line(data) {
var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
function segment() {
Function d3_geo_pathBuffer
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_geo_pathBuffer() {
var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];
var stream = {
point: point,
lineStart: function() {
Function options
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function options() {
function javascript(arg) {
this.jsOutput = arg;
}
Function pipe
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function pipe(compile) {
var options = parseArgs(process.argv);
if (!options.input) {
Function ajaxHandleResponses
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ajaxHandleResponses( s, jqXHR, responses ) {
var firstDataType, ct, finalDataType, type,
contents = s.contents,
dataTypes = s.dataTypes,
responseFields = s.responseFields;
Function _getMemberCount
has 43 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);