etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

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

      function cluster(g, prefix) {
        var _p = prefix || "";
        var output = [
            _p + "subgraph cluster_" + safe(g.name) + " {\n",
            _p + " label = <" + g.name + "<br/><font color=\"#404040\" point-size=\"5\">" + g.id + "</font>>;\n\n"
      Severity: Major
      Found in prototypes/shreder/lib/graphviz.js and 1 other location - About 4 hrs to fix
      prototypes/blender/lib/graphviz.js on lines 40..49

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

      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

      function cluster(g, prefix) {
        var _p = prefix || "";
        var output = [
            _p + "subgraph cluster_" + safe(g.name) + " {\n",
            _p + " label = <" + g.name + "<br/><font color=\"#404040\" point-size=\"5\">" + g.id + "</font>>;\n\n"
      Severity: Major
      Found in prototypes/blender/lib/graphviz.js and 1 other location - About 4 hrs to fix
      prototypes/shreder/lib/graphviz.js on lines 40..49

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

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

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

              if (!req.session || !req.session.user) {
                return res.send(401, JSON.stringify({ok: false, message: "You must be logged in to use this function"}));
              }
              else if (config.adminRoles && !hasAdminPermission(req.session.user)) {
                return res.send(403,JSON.stringify({ok:false, message: "You do not have permission to use this function."}));
          Severity: Major
          Found in test-set/express-couchUser-master/index.js and 1 other location - About 4 hrs to fix
          test-set/express-couchUser-master/index.js on lines 456..461

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

          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

              if (!req.session || !req.session.user) {
                return res.send(401, JSON.stringify({ok:false, message: "You must be logged in to use this function"}));
              }
              else if (config.adminRoles && !hasAdminPermission(req.session.user)) {
                return res.send(403,JSON.stringify({ok:false, message: "You do not have permission to use this function."}));
          Severity: Major
          Found in test-set/express-couchUser-master/index.js and 1 other location - About 4 hrs to fix
          test-set/express-couchUser-master/index.js on lines 422..427

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

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

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

                ;(function(undefined) {
                  'use strict';
                
                  /**
                   * Sigma Quadtree Module

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

                  function requires(path) {
                    return b.variableDeclaration("var", [
                      b.variableDeclarator(b.identifier("flx"), b.callExpression(
                        b.identifier("require"), // Anonymize the function expression.
                        [b.literal("./lib/flx")]
                  Severity: Major
                  Found in prototypes/shreder/lib/builders.js and 2 other locations - About 4 hrs to fix
                  prototypes/blender.old/lib/builders.js on lines 19..30
                  prototypes/blender/lib/templates.js on lines 19..30

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

                  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 3 locations. Consider refactoring.
                  Open

                  function requires(path) {
                    return b.variableDeclaration("var", [
                      b.variableDeclarator(b.identifier("flx"), b.callExpression(
                        b.identifier("require"), // Anonymize the function expression.
                        [b.literal("./lib/flx")]
                  Severity: Major
                  Found in prototypes/blender.old/lib/builders.js and 2 other locations - About 4 hrs to fix
                  prototypes/blender/lib/templates.js on lines 19..30
                  prototypes/shreder/lib/builders.js on lines 25..36

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

                  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 3 locations. Consider refactoring.
                  Open

                  function requires(path) {
                    return b.variableDeclaration("var", [
                      b.variableDeclarator(b.identifier("flx"), b.callExpression(
                        b.identifier("require"), // Anonymize the function expression.
                        [b.literal("./lib/flx")]
                  Severity: Major
                  Found in prototypes/blender/lib/templates.js and 2 other locations - About 4 hrs to fix
                  prototypes/blender.old/lib/builders.js on lines 19..30
                  prototypes/shreder/lib/builders.js on lines 25..36

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

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

                        var syncLogic = function() {
                          var cQindex = LQ.getIndexById(doc._id); //index of current doc in the query
                  
                          if (evName === 'remove' && LQ.docs[cQindex]) {
                  
                  
                  Severity: Major
                  Found in test-set/Moonridge-master/mr-rpc-methods.js - About 4 hrs to fix

                    File filereader.js has 334 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*!
                        FileReader.js - v0.9
                        A lightweight wrapper for common FileReader usage.
                        Copyright 2012 Brian Grinstead - MIT License.
                        See http://github.com/bgrins/filereader.js for documentation.
                    Severity: Minor
                    Found in test-set/gifsockets-server-master/public/js/filereader.js - About 4 hrs to fix

                      Function dsv has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        d3.dsv = function(delimiter, mimeType) {
                          var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
                          function dsv(url, row, callback) {
                            if (arguments.length < 3) callback = row, row = null;
                            var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);
                      Severity: Major
                      Found in lib/graph-printer/old/bower_components/d3/d3.js - About 4 hrs to fix

                        File dependency.js has 330 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        module.exports = {
                            walk: walk,
                          types: _types,
                          hash: _hash,
                          builders: {
                        Severity: Minor
                        Found in prototypes/blender.old/lib/dependency.js - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language