Showing 623 of 1,229 total issues
Function print
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
function print(ctx, skipRoot) {
var i,
flx,
_flx,
- 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 axis
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function axis(g) {
g.each(function() {
var g = d3.select(this);
var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy();
var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(".tick").data(ticks, scale1), tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", ε), tickExit = d3.transition(tick.exit()).style("opacity", ε).remove(), tickUpdate = d3.transition(tick.order()).style("opacity", 1), tickTransform;
Function done
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;
// Called once
Function render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function(gl, program, data, params) {
var buffer;
// Define attributes:
var positionLocation =
File context.js
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// # Fluxion mapper
// The compiler start by parsing the source to generate an Intermediate Representation (IR).
// It uses the [esprima parser](http://esprima.org/), which generates an Abstract Syntax Tree (AST) according to the [SpiderMonkey Parser API](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API).
Function insert
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
insert: function(after, node) {
var parent, grandpa, uncle;
if (after) {
node.P = after;
node.N = after.N;
Function setMatcher
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
if ( postFilter && !postFilter[ expando ] ) {
postFilter = setMatcher( postFilter );
}
if ( postFinder && !postFinder[ expando ] ) {
Function refresh
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.prototype.refresh = function() {
var i,
l,
k,
a,
Function _types
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _types(_walkers) {
return {
////////////////////////////////////////////////////////////////////////////////
// Programs //
Function __resolve
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
function __resolve(tree, forest) {
console.log(">> in ", tree.name);
for (var i = 0; i < tree.dep.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 relayout
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function relayout() {
var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
chords = [];
groups = [];
k = 0, i = -1;
Function voronoi
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geom.voronoi = function(points) {
var x = d3_geom_pointX, y = d3_geom_pointY, fx = x, fy = y, clipExtent = d3_geom_voronoiClipExtent;
if (points) return voronoi(points);
function voronoi(data) {
var polygons = new Array(data.length), x0 = clipExtent[0][0], y0 = clipExtent[0][1], x1 = clipExtent[1][0], y1 = clipExtent[1][1];
Function webgl
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.renderers.webgl = function(graph, camera, settings, options) {
if (typeof options !== 'object')
throw 'sigma.renderers.webgl: Wrong arguments.';
if (!(options.container instanceof HTMLElement))
Function superMatcher
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
superMatcher = function( seed, context, xml, results, expandContext ) {
var elem, j, matcher,
setMatched = [],
matchedCount = 0,
i = "0",
Function canvas
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.renderers.canvas = function(graph, camera, settings, options) {
if (typeof options !== 'object')
throw 'sigma.renderers.canvas: Wrong arguments.';
if (!(options.container instanceof HTMLElement))
Function d3_layout_packSiblings
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_layout_packSiblings(node) {
if (!(nodes = node.children) || !(n = nodes.length)) return;
var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
function bound(node) {
xMin = Math.min(node.x - node.r, xMin);
Function initialize
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Overview.prototype.initialize = function() {
this.on("initStatusUpdate", (function(_this) {
return function(statusmsg) {
_this.initStatus.status.push({
"code": 200,
Function getIndexForElement
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function getIndexForElement(element, array, sortBy) {
/**
*
* @param first element of an array
* @param second element of an array
Function initialize
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Overview.prototype.initialize = function () {
this.on('initStatusUpdate', function (_this) {
return function (statusmsg) {
_this.initStatus.status.push({
'code': 200,
Function process
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.renderers.webgl.prototype.process = function() {
var a,
i,
l,
k,