etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

Function load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.load = function(path, callback) {
      // Quick XHR polyfill:
      var xhr = (function() {
        if (window.XMLHttpRequest)
          return new XMLHttpRequest();

    Function register has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function register(name, fn) {
    
      // flx.register(name, function capsule(msg) {
      //   // merge scope (this) and signature (msg._sign)
      //   (function reply(req, res) {
    Severity: Minor
    Found in prototypes/shreder/lib/builders.js - About 1 hr to fix

      Function _quadSubdivide has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function _quadSubdivide(index, quad) {
          var next = quad.level + 1,
              subw = Math.round(quad.bounds.width / 2),
              subh = Math.round(quad.bounds.height / 2),
              qx = Math.round(quad.bounds.x),

        Function resolution has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function resolution(graphParts) {
        
          var _contexts = {};
        
          for (var i = 0; i < graphParts.length; i++) {
        Severity: Minor
        Found in prototypes/recast/main.js - About 1 hr to fix

          Function token has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                function token() {
                  if (I >= N) return EOF;
                  if (eol) return eol = false, EOL;
                  var j = I;
                  if (text.charCodeAt(j) === 34) {
          Severity: Minor
          Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

            Function circle has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              d3.geo.circle = function() {
                var origin = [ 0, 0 ], angle, precision = 6, interpolate;
                function circle() {
                  var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];
                  interpolate(null, null, 1, {
            Severity: Minor
            Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

              Function brush has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function brush(g) {
                    g.each(function() {
                      var g = d3.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
                      var background = g.selectAll(".background").data([ 0 ]);
                      background.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
              Severity: Minor
              Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

                Function d3_interpolateString has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function d3_interpolateString(a, b) {
                    var bi = d3_interpolate_numberA.lastIndex = d3_interpolate_numberB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];
                    a = a + "", b = b + "";
                    while ((am = d3_interpolate_numberA.exec(a)) && (bm = d3_interpolate_numberB.exec(b))) {
                      if ((bs = bm.index) > bi) {
                Severity: Minor
                Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

                  Function promise has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jQuery.ready.promise = function( obj ) {
                      if ( !readyList ) {
                  
                          readyList = jQuery.Deferred();
                  
                  
                  Severity: Minor
                  Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

                    Function handlers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        handlers: function( event, handlers ) {
                            var sel, handleObj, matches, i,
                                handlerQueue = [],
                                delegateCount = handlers.delegateCount,
                                cur = event.target;
                    Severity: Minor
                    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

                      Function Overview has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function Overview(express, redis, options) {
                            this.express = express;
                            this.redis = redis;
                            this.options = options;
                            this._formatByte = __bind(this._formatByte, this);
                      Severity: Minor
                      Found in test-set/redis_key_overview-master/modules/keyoverview.js - About 1 hr to fix

                        Function Overview has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function Overview(express, redis, options) {
                                  this.express = express;
                                  this.redis = redis;
                                  this.options = options;
                                  this._formatByte = __bind(this._formatByte, this);
                        Severity: Minor
                        Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

                          Function ensureValidToken has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function ensureValidToken(userSession, cb) {
                              var then      = new Date(userSession.createdAt);
                              var now       = new Date();
                              var remaining = (now - then) / 1000; // Remaining until token expires.
                              remaining += 600; // Add 10 minutes
                          Severity: Minor
                          Found in test-set/node-heroku-bouncer-master/lib/middleware.js - About 1 hr to fix

                            Function step has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function step() {
                                  var p = (sigma.utils.dateNow() - start) / duration;
                            
                                  if (p >= 1) {
                                    s.graph.nodes().forEach(function(node) {

                              Function getBoundaries has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                sigma.utils.getBoundaries = function(graph, prefix, doEdges) {
                                  var i,
                                      l,
                                      e = graph.edges(),
                                      n = graph.nodes(),

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

                                  var variables = ctx.scopes
                                    .map(function (s) { return s.variables; })
                                    .reduce(function(a, b) { return a.concat(b); }, [])
                                    .map(function (s) { return { name: s.name, identifiers: getLocs(s.identifiers), references: getLocs(s.references), defs: getLocs(s.defs) }; })
                                Severity: Major
                                Found in lib/graph-inspector-printer/graph.js and 2 other locations - About 1 hr to fix
                                lib/graph-inspector-printer/graph.js on lines 44..47
                                lib/graph-inspector-printer/graph.js on lines 89..102

                                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 59.

                                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

                                  return ("i" + str).replace(/\+/g, 'plus')
                                                    .replace(/\-\_/g, 'minus_')
                                                    .replace(/\-/g, '_')
                                                    .replace(/>/g, '')
                                                    .replace(/\//g, '')
                                Severity: Major
                                Found in prototypes/blender/lib/graphviz.js and 1 other location - About 1 hr to fix
                                prototypes/shreder/lib/graphviz.js on lines 7..12

                                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 59.

                                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

                                    greatArc.source = function(_) {
                                      if (!arguments.length) return source;
                                      source = _, source_ = typeof _ === "function" ? null : _;
                                      return greatArc;
                                    };
                                Severity: Major
                                Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 1 hr to fix
                                lib/graph-printer/old/bower_components/d3/d3.js on lines 4503..4507

                                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 59.

                                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

                                    greatArc.target = function(_) {
                                      if (!arguments.length) return target;
                                      target = _, target_ = typeof _ === "function" ? null : _;
                                      return greatArc;
                                    };
                                Severity: Major
                                Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 1 hr to fix
                                lib/graph-printer/old/bower_components/d3/d3.js on lines 4498..4502

                                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 59.

                                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

                                      if (lx > rx) {
                                        if (!va) va = {
                                          x: fx,
                                          y: y0
                                        }; else if (va.y >= y1) return;
                                Severity: Major
                                Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 1 hr to fix
                                lib/graph-printer/old/bower_components/d3/d3.js on lines 5038..5047

                                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 59.

                                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