etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

app.get('/:id', function(req, res) {
  var uid = req.params.id;
  var cid = _cid++;

  // console.log(">> IN " + cid);
Severity: Major
Found in prototypes/fluxions/lib/web.js and 1 other location - About 3 hrs to fix
prototypes/fluxions/lib/web_setTimeout.js on lines 21..28

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

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

function d3_layout_hierarchyVisitBefore(node, callback) {
  var nodes = [ node ];
  while ((node = nodes.pop()) != null) {
    callback(node);
    if ((children = node.children) && (n = children.length)) {
Severity: Major
Found in lib/graph-printer/pack-layout.js and 1 other location - About 3 hrs to fix
lib/graph-printer/old/bower_components/d3/d3.js on lines 6383..6392

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

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

  function d3_layout_hierarchyVisitBefore(node, callback) {
    var nodes = [ node ];
    while ((node = nodes.pop()) != null) {
      callback(node);
      if ((children = node.children) && (n = children.length)) {
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 3 hrs to fix
lib/graph-printer/pack-layout.js on lines 111..120

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

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

  function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {
    return function(rotate, listener) {
      var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);
      var clip = {
        point: point,
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 3 hrs to fix

    Function exports has 90 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function(grunt) {
    
      // Project configuration.
      grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
    Severity: Major
    Found in gruntfile.js - About 3 hrs to fix

      Function exports has 90 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(options) {
        var cipher = encryptor(options.encryptionSecret);
      
        return function(req, res, next) {
          var userSession = getUserSession(req, options.sessionSyncNonce);
      Severity: Major
      Found in test-set/node-heroku-bouncer-master/lib/middleware.js - About 3 hrs to fix

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

        function register(name, fn, scp) {
          if (flx_repo[name])
            return false;
        
          scp = scp || {};
        Severity: Major
        Found in prototypes/fluxions/lib/flx_setTimeout.js and 3 other locations - About 3 hrs to fix
        prototypes/fluxions/lib/flx.js on lines 48..62
        prototypes/fluxions/lib/flx_chain.js on lines 47..61
        prototypes/fluxions/lib/flx_nextTick.js on lines 52..66

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

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

        function register(name, fn, scp) {
          if (flx_repo[name])
            return false;
        
          scp = scp || {};
        Severity: Major
        Found in prototypes/fluxions/lib/flx.js and 3 other locations - About 3 hrs to fix
        prototypes/fluxions/lib/flx_chain.js on lines 47..61
        prototypes/fluxions/lib/flx_nextTick.js on lines 52..66
        prototypes/fluxions/lib/flx_setTimeout.js on lines 48..62

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

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

        function register(name, fn, scp) {
          if (flx_repo[name])
            return false;
        
          scp = scp || {};
        Severity: Major
        Found in prototypes/fluxions/lib/flx_chain.js and 3 other locations - About 3 hrs to fix
        prototypes/fluxions/lib/flx.js on lines 48..62
        prototypes/fluxions/lib/flx_nextTick.js on lines 52..66
        prototypes/fluxions/lib/flx_setTimeout.js on lines 48..62

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

        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 recvMsg(msg) {
            if (!flx_repo[msg.dest]) {
              console.log(msg.dest + ' not defined');
              // link(msg.dest);
            }
        Severity: Major
        Found in prototypes/fluxions/lib/flx.js and 2 other locations - About 3 hrs to fix
        prototypes/fluxions/lib/flx_nextTick.js on lines 34..42
        prototypes/fluxions/lib/flx_setTimeout.js on lines 30..38

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

        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 recvMsg(msg) {
            if (!flx_repo[msg.dest]) {
              console.log(msg.dest + ' not defined');
              // link(msg.dest);
            }
        Severity: Major
        Found in prototypes/fluxions/lib/flx_nextTick.js and 2 other locations - About 3 hrs to fix
        prototypes/fluxions/lib/flx.js on lines 30..38
        prototypes/fluxions/lib/flx_setTimeout.js on lines 30..38

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

        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 recvMsg(msg) {
            if (!flx_repo[msg.dest]) {
              console.log(msg.dest + ' not defined');
              // link(msg.dest);
            }
        Severity: Major
        Found in prototypes/fluxions/lib/flx_setTimeout.js and 2 other locations - About 3 hrs to fix
        prototypes/fluxions/lib/flx.js on lines 30..38
        prototypes/fluxions/lib/flx_nextTick.js on lines 34..42

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

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

        function register(name, fn, scp) {
          if (flx_repo[name])
            return false;
        
          scp = scp || {};
        Severity: Major
        Found in prototypes/fluxions/lib/flx_nextTick.js and 3 other locations - About 3 hrs to fix
        prototypes/fluxions/lib/flx.js on lines 48..62
        prototypes/fluxions/lib/flx_chain.js on lines 47..61
        prototypes/fluxions/lib/flx_setTimeout.js on lines 48..62

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

        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

            scale = settings('scalingMode') === 'outside' ?
              Math.max(
                w / Math.max(maxX - minX, 1),
                h / Math.max(maxY - minY, 1)
              ) :
        prototypes/express/src/console/sigma/src/middlewares/sigma.middlewares.rescale.js on lines 53..61

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

        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

            scale = settings('scalingMode') === 'outside' ?
              Math.max(
                w / Math.max(maxX - minX, 1),
                h / Math.max(maxY - minY, 1)
              ) :
        prototypes/express/src/console/sigma/src/middlewares/sigma.middlewares.rescale.js on lines 83..91

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

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

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

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

          app.get('/:id', function(req, res) {
            var uid = req.params.id;
            var cid = _cid++;
          
            flx.start(flx.m("output", {cid: cid, res: res}));
          Severity: Major
          Found in prototypes/fluxions/lib/web_nextTick.js and 1 other location - About 3 hrs to fix
          prototypes/fluxions/lib/web_chain.js on lines 18..24

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

          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

          app.get('/:id', function(req, res) {
            var uid = req.params.id;
            var cid = _cid++;
          
            flx.start(flx.m("output", {cid: cid, res: res}));
          Severity: Major
          Found in prototypes/fluxions/lib/web_chain.js and 1 other location - About 3 hrs to fix
          prototypes/fluxions/lib/web_nextTick.js on lines 18..24

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

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

              remove: function(node) {
                if (node.N) node.N.P = node.P;
                if (node.P) node.P.N = node.N;
                node.N = node.P = null;
                var parent = node.U, sibling, left = node.L, right = node.R, next, red;
          Severity: Major
          Found in lib/graph-printer/old/bower_components/d3/d3.js - About 3 hrs to fix

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

            function HelloWorld(msg) {
              return b.functionExpression(b.identifier("HelloWorld"), [
                  b.identifier("msg")
                ],
                b.blockStatement([
            Severity: Major
            Found in prototypes/shreder/lib/builders.js and 5 other locations - About 3 hrs to fix
            prototypes/blender.old/lib/builders.js on lines 102..122
            prototypes/blender.old/lib/builders.js on lines 124..144
            prototypes/blender/lib/templates.js on lines 102..122
            prototypes/blender/lib/templates.js on lines 124..144
            prototypes/shreder/lib/builders.js on lines 227..247

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

            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