etnbrd/flx-compiler

View on GitHub

Showing 623 of 1,229 total issues

Consider simplifying this complex logical expression.
Open

            if ( event.pageX == null && original.clientX != null ) {
                eventDoc = event.target.ownerDocument || document;
                doc = eventDoc.documentElement;
                body = eventDoc.body;

Severity: Critical
Found in test-set/gifsockets-server-master/public/js/jquery.js - About 5 hrs to fix

    Function generateRoutes has 124 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Overview.prototype.generateRoutes = function() {
          this.express.get('/generate', (function(_this) {
            return function(req, res) {
              var _ref;
              if ((_ref = _this.initStatus) != null ? _ref.initializing : void 0) {
    Severity: Major
    Found in test-set/redis_key_overview-master/modules/keyoverview.js - About 4 hrs to fix

      File sigma.core.js has 371 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      ;(function(undefined) {
        'use strict';
      
        var __instances = {};
      
      
      Severity: Minor
      Found in prototypes/express/src/console/sigma/src/sigma.core.js - About 4 hrs to fix

        Function axis has 122 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          d3.svg.axis = function() {
            var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;
            function axis(g) {
              g.each(function() {
                var g = d3.select(this);
        Severity: Major
        Found in lib/graph-printer/old/bower_components/d3/d3.js - About 4 hrs to fix

          File sigma.classes.graph.js has 370 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          ;(function(undefined) {
            'use strict';
          
            var _methods = Object.create(null),
                _indexes = Object.create(null),

            Function exports has 121 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            module.exports = function(grunt) {
              var coreJsFiles = [
                // Core:
                'src/sigma.core.js',
            
            
            Severity: Major
            Found in prototypes/express/src/console/sigma/Gruntfile.js - About 4 hrs to fix

              Function support has 119 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.support = (function() {
              
                  var support, all, a,
                      input, select, fragment,
                      opt, eventName, isSupported, i,
              Severity: Major
              Found in test-set/gifsockets-server-master/public/js/jquery.js - About 4 hrs to fix

                Function addEdge has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    addEdge: function(edge, source, target, data, i, prefix, settings) {
                      var w = (edge[prefix + 'size'] || 1) / 2,
                          x1 = source[prefix + 'x'],
                          y1 = source[prefix + 'y'],
                          x2 = target[prefix + 'x'],

                  Function build has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function build(tree) {
                  
                  
                    _down = {};
                    _up = {};
                  Severity: Minor
                  Found in prototypes/blender.old/lib/build.js - About 4 hrs to fix

                  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 tree has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    d3.layout.tree = function() {
                      var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = null;
                      function tree(d, i) {
                        var nodes = hierarchy.call(this, d, i), root0 = nodes[0], root1 = wrapTree(root0);
                        d3_layout_hierarchyVisitAfter(root1, firstWalk), root1.parent.m = -root1.z;
                  Severity: Major
                  Found in lib/graph-printer/old/bower_components/d3/d3.js - About 4 hrs to fix

                    Function render has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      sigma.renderers.canvas.prototype.render = function(options) {
                        options = options || {};
                    
                        var a,
                            i,

                      Function chord has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        d3.layout.chord = function() {
                          var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
                          function relayout() {
                            var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
                            chords = [];
                      Severity: Major
                      Found in lib/graph-printer/old/bower_components/d3/d3.js - About 4 hrs to fix

                        Function add has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        this.add = function(name, timbit, callback) {  
                          timbits.log.info("Placing " + name + " in the box");
                          timbits.box[name] = timbit;
                          
                          timbit.name = name;
                        Severity: Major
                        Found in test-set/timbits-master/lib/timbits.js - About 4 hrs to fix

                          Function generateRoutes has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  Overview.prototype.generateRoutes = function () {
                                    this.express.get('/generate', function (_this) {
                                      return function (req, res) {
                                        var _ref;
                                        if ((_ref = _this.initStatus) != null ? _ref.initializing : void 0) {
                          Severity: Major
                          Found in test-set/redis_key_overview-master/index-flx.js - About 4 hrs to fix

                            Function reduction has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function reduction(graphParts) {
                            
                              // Detect if a node has multiple dependencies
                              var _branches = [];
                              var _dirty = false;
                            Severity: Minor
                            Found in prototypes/recast/main.js - About 4 hrs to fix

                            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 brushstart has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function brushstart() {
                                  var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = d3.mouse(target), offset;
                                  var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup);
                                  if (d3.event.changedTouches) {
                                    w.on("touchmove.brush", brushmove).on("touchend.brush", brushend);
                            Severity: Major
                            Found in lib/graph-printer/old/bower_components/d3/d3.js - About 4 hrs to fix

                              Function _handleMove has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function _handleMove(e) {
                                    if (!_doubleTap && _settings('touchEnabled')) {
                                      var x0,
                                          x1,
                                          y0,

                                File sigma.webgl.edges.arrow.js has 341 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                ;(function() {
                                  'use strict';
                                
                                  sigma.utils.pkg('sigma.webgl.edges');
                                
                                

                                  File script.js has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  'use strict';
                                  
                                  var socket = io.connect('http://localhost:8080');
                                  var logElm = document.getElementById("log");
                                  
                                  
                                  Severity: Minor
                                  Found in prototypes/express/src/console/script.js - About 4 hrs to fix

                                    Function quadtree has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      d3.geom.quadtree = function(points, x1, y1, x2, y2) {
                                        var x = d3_geom_pointX, y = d3_geom_pointY, compat;
                                        if (compat = arguments.length) {
                                          x = d3_geom_quadtreeCompatX;
                                          y = d3_geom_quadtreeCompatY;
                                    Severity: Major
                                    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 4 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language