etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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 =

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            if (!arguments.length) {
              stats = [];
        
              for (k in _jobs)
                stats.push(_jobs[k]);
        Severity: Major
        Found in prototypes/express/src/console/sigma/src/conrad.js and 1 other location - About 2 hrs to fix
        prototypes/express/src/console/sigma/src/conrad.js on lines 815..828

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 89.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

              } else {
                a = [];
        
                for (k in _jobs)
                  a.push(_jobs[k]);
        Severity: Major
        Found in prototypes/express/src/console/sigma/src/conrad.js and 1 other location - About 2 hrs to fix
        prototypes/express/src/console/sigma/src/conrad.js on lines 768..781

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 89.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        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

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                    argChain.deps.forEach(function(dep) {
                      if (node.id === dep.id) {
                        dep.id = appendNode.id;
                      }
                      if (node.id === dep.to) {
            Severity: Major
            Found in prototypes/blender.old/index.js and 1 other location - About 2 hrs to fix
            prototypes/blender/lib/extraction.js on lines 98..105

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 88.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                      argChain.deps.forEach(function(dep) {
                        if (node.id === dep.id) {
                          dep.id = appendNode.id;
                        }
                        if (node.id === dep.to) {
            Severity: Major
            Found in prototypes/blender/lib/extraction.js and 1 other location - About 2 hrs to fix
            prototypes/blender.old/index.js on lines 251..258

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 88.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                  this.express.get('/:type', (function(_this) {
                    return function(req, res, next) {
                      return res.sendfile("./static/html/" + req.params.type + "overview.html", function(error) {
                        if (error != null) {
                          next();
            Severity: Major
            Found in test-set/redis_key_overview-master/modules/keyoverview.js and 1 other location - About 2 hrs to fix
            test-set/redis_key_overview-master/index-flx.js on lines 334..342

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 88.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                      this.express.get('/:type', function (_this) {
                        return function (req, res, next) {
                          return res.sendfile('./static/html/' + req.params.type + 'overview.html', function (error) {
                            if (error != null) {
                              next();
            Severity: Major
            Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 2 hrs to fix
            test-set/redis_key_overview-master/modules/keyoverview.js on lines 305..313

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 88.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            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))

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                          if (msg)
                            if (Array.isArray(msg.dest)) for (var i = 0; i < msg.dest.length; i++) {
                              recvMsg(message(msg.dest[i], msg.body));
                            } else {
                              recvMsg(msg);
                        Severity: Major
                        Found in prototypes/fluxions/lib/flx.js and 3 other locations - About 2 hrs to fix
                        prototypes/fluxions/lib/flx_chain.js on lines 39..44
                        prototypes/fluxions/lib/flx_nextTick.js on lines 44..49
                        prototypes/fluxions/lib/flx_setTimeout.js on lines 40..45

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 86.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                          if (msg)
                            if (Array.isArray(msg.dest)) for (var i = 0; i < msg.dest.length; i++) {
                              recvMsg(m(msg.dest[i], msg.body));
                            } else {
                              recvMsg(msg);
                        Severity: Major
                        Found in prototypes/fluxions/lib/flx_nextTick.js and 3 other locations - About 2 hrs to fix
                        prototypes/fluxions/lib/flx.js on lines 40..45
                        prototypes/fluxions/lib/flx_chain.js on lines 39..44
                        prototypes/fluxions/lib/flx_setTimeout.js on lines 40..45

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 86.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language