etnbrd/flx-compiler

View on GitHub

Showing 623 of 1,229 total issues

Function force has 207 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.layout.force = function() {
    var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges;
    function repulse(node) {
      return function(quad, x1, _, x2) {
        if (quad.point !== node) {
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 day to fix

    Function exports has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
    Open

    module.exports = function(config) {
      var app = express(),
        safeUserFields = config.safeUserFields ? config.safeUserFields : "name email roles",
        db;
    
    
    Severity: Minor
    Found in test-set/express-couchUser-master/index.js - About 7 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 render has 179 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      sigma.renderers.webgl.prototype.render = function(params) {
        var a,
            i,
            l,
            k,

      Function isFunction has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
      Open

      Context.prototype.isFunction = function(id) {
      
        // TODO this function is a mess : refactor.
      
        if (id.context) {
      Severity: Minor
      Found in lib/analyzer/context.js - About 7 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 Context has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
      Open

      function Context (ast, filename, dirname, root) {
        // + The filename
        this.name = filename;
        this.dirname = dirname;
        this.root = root;
      Severity: Minor
      Found in lib/analyzer/context.js - About 6 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

      File timbits.js has 450 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      
      // load required modules
      var fs = require('fs')
        , path = require('path')
        , querystring = require('querystring')
      Severity: Minor
      Found in test-set/timbits-master/lib/timbits.js - About 6 hrs to fix

        File conrad.js has 450 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * conrad.js is a tiny JavaScript jobs scheduler,
         *
         * Version: 0.1.0
         * Sources: http://github.com/jacomyal/conrad.js
        Severity: Minor
        Found in prototypes/express/src/console/sigma/src/conrad.js - About 6 hrs to fix

          File index.js has 413 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // # expressUserCouchDb
          //
          // This module is an express plugin module, which means you can
          // require the module in your express app, and add it to your express
          // application by using `app.use(user(config));`
          Severity: Minor
          Found in test-set/express-couchUser-master/index.js - About 5 hrs to fix

            Function treemap has 146 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              d3.layout.treemap = function() {
                var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
                function scale(children, k) {
                  var i = -1, n = children.length, child, area;
                  while (++i < n) {
            Severity: Major
            Found in lib/graph-printer/old/bower_components/d3/d3.js - About 5 hrs to fix

              Function bindEvents has 144 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                sigma.misc.bindEvents = function(prefix) {
                  var i,
                      l,
                      mX,
                      mY,

                Function getIndexForElement has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                Open

                module.exports = function getIndexForElement(element, array, sortBy) {
                    /**
                     *
                     * @param first    element of an array
                     * @param second element of an array
                Severity: Minor
                Found in test-set/Moonridge-master/utils/indexInSortedArray.js - About 5 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 MRQuery has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                module.exports = function MRQuery(model, clientQuery) {
                    var query = model.find();
                
                    //query option object,where we index by method, not by invocation order, useful later when we reexecute the query
                    var opts = {populate:[]};
                Severity: Minor
                Found in test-set/Moonridge-master/query-builder.js - About 5 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 render has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    render: function(gl, program, data, params) {
                      var buffer;
                
                      // Define attributes:
                      var positionLocation1 =

                  Function Graph has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function Graph(xml) {
                      var _xml = {};
                  
                      // Basic Properties
                      //------------------

                    Function d3_geo_clipExtent has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function d3_geo_clipExtent(x0, y0, x1, y1) {
                        return function(listener) {
                          var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring;
                          var clip = {
                            point: point,
                    Severity: Major
                    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 5 hrs to fix

                      File sigma.renderers.webgl.js has 385 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      ;(function(undefined) {
                        'use strict';
                      
                        if (typeof sigma === 'undefined')
                          throw 'sigma is not declared';

                        Function Callbacks has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        jQuery.Callbacks = function( options ) {
                        
                            // Convert options from String-formatted to Object-formatted if needed
                            // (we check in cache first)
                            options = typeof options === "string" ?
                        Severity: Major
                        Found in test-set/gifsockets-server-master/public/js/jquery.js - About 5 hrs to fix

                          Function graph has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function graph(ctx, code) {
                            var tagsByLine = [], nbLines;
                            code = String(code).split('\n');
                            nbLines = code.length;
                          
                          
                          Severity: Major
                          Found in lib/graph-inspector-printer/graph.js - About 5 hrs to fix

                            Function Context has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function Context (ast, filename, dirname, root) {
                              // + The filename
                              this.name = filename;
                              this.dirname = dirname;
                              this.root = root;
                            Severity: Major
                            Found in lib/analyzer/context.js - About 5 hrs to fix

                              Function bounds has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                d3.geo.bounds = function() {
                                  var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;
                                  var bound = {
                                    point: point,
                                    lineStart: lineStart,
                              Severity: Major
                              Found in lib/graph-printer/old/bower_components/d3/d3.js - About 5 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language