etnbrd/flx-compiler

View on GitHub

Showing 623 of 1,229 total issues

Function print has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function print(ctx, skipRoot) {

  var i,
      flx,
      _flx,
Severity: Minor
Found in lib/js-printer/index.js - About 2 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 axis has 68 lines of code (exceeds 25 allowed). Consider refactoring.
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;
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

    Function done has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function done( status, nativeStatusText, responses, headers ) {
                var isSuccess, success, error, response, modified,
                    statusText = nativeStatusText;
    
                // Called once
    Severity: Major
    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 hrs to fix

      Function render has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      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

        // # 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).
        
        
        Severity: Minor
        Found in lib/analyzer/context.js - About 2 hrs to fix

          Function insert has 67 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              insert: function(after, node) {
                var parent, grandpa, uncle;
                if (after) {
                  node.P = after;
                  node.N = after.N;
          Severity: Major
          Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

            Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                if ( postFilter && !postFilter[ expando ] ) {
                    postFilter = setMatcher( postFilter );
                }
                if ( postFinder && !postFinder[ expando ] ) {
            Severity: Major
            Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 hrs to fix

              Function refresh has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                sigma.prototype.refresh = function() {
                  var i,
                      l,
                      k,
                      a,
              Severity: Major
              Found in prototypes/express/src/console/sigma/src/sigma.core.js - About 2 hrs to fix

                Function _types has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function _types(_walkers) {
                
                  return {
                ////////////////////////////////////////////////////////////////////////////////
                // Programs                                                                   //
                Severity: Major
                Found in prototypes/shreder/lib/traverse.js - About 2 hrs to fix

                  Function __resolve has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function __resolve(tree, forest) {
                  
                    console.log(">> in ", tree.name);
                  
                    for (var i = 0; i < tree.dep.length; i++) {
                  Severity: Minor
                  Found in prototypes/blender.old/lib/resolution.js - About 2 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 relayout has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Function voronoi has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    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];
                    Severity: Major
                    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

                      Function webgl has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      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

                                superMatcher = function( seed, context, xml, results, expandContext ) {
                                    var elem, j, matcher,
                                        setMatched = [],
                                        matchedCount = 0,
                                        i = "0",
                        Severity: Major
                        Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 hrs to fix

                          Function canvas has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                          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

                              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);
                            Severity: Major
                            Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

                              Function initialize has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  Overview.prototype.initialize = function() {
                                    this.on("initStatusUpdate", (function(_this) {
                                      return function(statusmsg) {
                                        _this.initStatus.status.push({
                                          "code": 200,
                              Severity: Major
                              Found in test-set/redis_key_overview-master/modules/keyoverview.js - About 2 hrs to fix

                                Function getIndexForElement has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                module.exports = function getIndexForElement(element, array, sortBy) {
                                    /**
                                     *
                                     * @param first    element of an array
                                     * @param second element of an array
                                Severity: Major
                                Found in test-set/Moonridge-master/utils/indexInSortedArray.js - About 2 hrs to fix

                                  Function initialize has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          Overview.prototype.initialize = function () {
                                            this.on('initStatusUpdate', function (_this) {
                                              return function (statusmsg) {
                                                _this.initStatus.status.push({
                                                  'code': 200,
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js - About 2 hrs to fix

                                    Function process has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      sigma.renderers.webgl.prototype.process = function() {
                                        var a,
                                            i,
                                            l,
                                            k,
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language