etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

      var w = (edge[prefix + 'size'] || 1) / 2,
          x1 = source[prefix + 'x'],
          y1 = source[prefix + 'y'],
          x2 = target[prefix + 'x'],
          y2 = target[prefix + 'y'],
prototypes/express/src/console/sigma/src/renderers/webgl/sigma.webgl.edges.fast.js on lines 16..21

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

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

      var w = (edge[prefix + 'size'] || 1) / 2,
          x1 = source[prefix + 'x'],
          y1 = source[prefix + 'y'],
          x2 = target[prefix + 'x'],
          y2 = target[prefix + 'y'],
prototypes/express/src/console/sigma/src/renderers/webgl/sigma.webgl.edges.def.js on lines 19..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 84.

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

  d3.nest = function() {
    var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
    function map(mapType, array, depth) {
      if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
      var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

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

    module.exports = function(grunt) {
      grunt.initConfig({
        clean: ['coverage'],
        jshint: {
          files: src
    Severity: Major
    Found in test-set/express-couchUser-master/Gruntfile.js - About 2 hrs to fix

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

      module.exports = function(options) {
        var cipher = encryptor(options.encryptionSecret);
        var oauth  = getOAuth();
        var router = new express.Router();
      
      
      Severity: Major
      Found in test-set/node-heroku-bouncer-master/lib/router.js - About 2 hrs to fix

        Function extractUp has 61 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function extractUp(tree, id) {
        
          var _n = {};
          var __n = {};
          var _d = {};
        Severity: Major
        Found in prototypes/blender.old/lib/extraction.js - About 2 hrs to fix

          Function addEdge has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              addEdge: function(edge, source, target, data, i, prefix, settings) {
                var w = (edge[prefix + 'size'] || 1) / 2,
                    x1 = source[prefix + 'x'],
                    y1 = source[prefix + 'y'],
                    x2 = target[prefix + 'x'],

            Function extractUp has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function extractUp(tree, id) {
            
              var _n = {};
              var __n = {};
              var _d = {};
            Severity: Major
            Found in prototypes/blender/lib/extract.js - About 2 hrs to fix

              Function registerId has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
              Open

              FnScope.prototype.registerId = function(id) {
                if (id.name) {
              
                  function findVar(scope, name) {
                    for (var _var in scope._var) {
              Severity: Minor
              Found in prototypes/shreder/lib/constructors.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 Deferred has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  Deferred: function( func ) {
                      var tuples = [
                              // action, add listener, listener list, final state
                              [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                              [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
              Severity: Major
              Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 hrs to fix

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

                flx.register("view", function(msg) {
                  msg.view = msg.uid + "[" + msg.count + "]";
                  msg.uid = undefined;
                  msg.count = undefined;
                  return this.m("output", msg);
                Severity: Major
                Found in prototypes/fluxions/count_setImmediate.js and 3 other locations - About 2 hrs to fix
                prototypes/fluxions/count_chain.js on lines 12..17
                prototypes/fluxions/count_nextTick.js on lines 12..17
                prototypes/fluxions/count_setTimeout.js on lines 12..17

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

                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

                flx.register("view", function(msg) {
                  msg.view = msg.uid + "[" + msg.count + "]";
                  msg.uid = undefined;
                  msg.count = undefined;
                  return this.m("output", msg);
                Severity: Major
                Found in prototypes/fluxions/count_setTimeout.js and 3 other locations - About 2 hrs to fix
                prototypes/fluxions/count_chain.js on lines 12..17
                prototypes/fluxions/count_nextTick.js on lines 12..17
                prototypes/fluxions/count_setImmediate.js on lines 12..17

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

                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

                flx.register("view", function(msg) {
                  msg.view = msg.uid + "[" + msg.count + "]";
                  msg.uid = undefined;
                  msg.count = undefined;
                  return this.m("output", msg);
                Severity: Major
                Found in prototypes/fluxions/count_nextTick.js and 3 other locations - About 2 hrs to fix
                prototypes/fluxions/count_chain.js on lines 12..17
                prototypes/fluxions/count_setImmediate.js on lines 12..17
                prototypes/fluxions/count_setTimeout.js on lines 12..17

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

                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

                flx.register("view", function(msg) {
                  msg.view = msg.uid + "[" + msg.count + "]";
                  msg.uid = undefined;
                  msg.count = undefined;
                  return this.m("output", msg);
                Severity: Major
                Found in prototypes/fluxions/count_chain.js and 3 other locations - About 2 hrs to fix
                prototypes/fluxions/count_nextTick.js on lines 12..17
                prototypes/fluxions/count_setImmediate.js on lines 12..17
                prototypes/fluxions/count_setTimeout.js on lines 12..17

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

                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

                      path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 2 hrs to fix
                lib/graph-printer/old/bower_components/d3/d3.js on lines 7937..7937

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

                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

                      path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 2 hrs to fix
                lib/graph-printer/old/bower_components/d3/d3.js on lines 7954..7954

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

                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

                    while (++i <= n) {
                      pi = points[i];
                      px.shift();
                      px.push(pi[0]);
                      py.shift();
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 2 hrs to fix
                lib/graph-printer/old/bower_components/d3/d3.js on lines 7994..8001

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

                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

                    while (++i < n) {
                      pi = points[i];
                      px.shift();
                      px.push(pi[0]);
                      py.shift();
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 2 hrs to fix
                lib/graph-printer/old/bower_components/d3/d3.js on lines 7972..7979

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

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

                  function d3_scale_log(linear, base, positive, domain) {
                    function log(x) {
                      return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base);
                    }
                    function pow(x) {
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

                  Function clipLine has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function clipLine(listener) {
                        var point0, c0, v0, v00, clean;
                        return {
                          lineStart: function() {
                            v00 = v0 = false;
                  Severity: Major
                  Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language