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

flx.register("output", function(msg){
  if (msg.res) {
    this.cid[msg.cid] = msg.res;
  } else {
    this.cid[msg.cid].send(msg.view.toString());
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 7..16

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

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

flx.register("output", function(msg){
  if (msg.res) {
    this.cid[msg.cid] = msg.res;
  } else {
    this.cid[msg.cid].send(msg.view.toString());
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 7..16

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

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

                send: function( headers, complete ) {

                    // Get a new xhr
                    var handle, i,
                        xhr = s.xhr();
Severity: Major
Found in test-set/gifsockets-server-master/public/js/jquery.js - About 3 hrs to fix

    Function generateViews has 82 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            Overview.prototype.generateViews = function () {
              var _conReading, _keystream;
              _keystream = fs.createReadStream(this.options.keyfilename);
              this.emit('initStatusUpdate', 'Started reading the keys from local file, requesting information about the key from redis and packing these information.');
              _conReading = function (_this) {
    Severity: Major
    Found in test-set/redis_key_overview-master/index-flx.js - About 3 hrs to fix

      Function generateViews has 82 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Overview.prototype.generateViews = function() {
            var _conReading, _keystream;
            _keystream = fs.createReadStream(this.options.keyfilename);
            this.emit('initStatusUpdate', "Started reading the keys from local file, requesting information about the key from redis and packing these information.");
            _conReading = (function(_this) {
      Severity: Major
      Found in test-set/redis_key_overview-master/modules/keyoverview.js - About 3 hrs to fix

        Function rescale has 82 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          sigma.middlewares.rescale = function(readPrefix, writePrefix, options) {
            var i,
                l,
                a,
                b,

          Function start has 82 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function start(tree) {
          
            // Get the app.get nodes
            return tree.nodes.filter(h.customFinder({
              name: "app.get",
          Severity: Major
          Found in prototypes/blender/lib/extraction.js - About 3 hrs to fix

            Function resolution has a Cognitive Complexity of 23 (exceeds 5 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 3 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 4 locations. Consider refactoring.
            Open

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

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

            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("input", function(msg){
              this.uid[msg.uid] = this.uid[msg.uid] + 1 || 1;
              msg.count = this.uid[msg.uid];
              return this.m("view", msg);
            },{
            Severity: Major
            Found in prototypes/fluxions/count_setTimeout.js and 3 other locations - About 3 hrs to fix
            prototypes/fluxions/count_chain.js on lines 4..10
            prototypes/fluxions/count_nextTick.js on lines 4..10
            prototypes/fluxions/count_setImmediate.js on lines 4..10

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

            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("input", function(msg){
              this.uid[msg.uid] = this.uid[msg.uid] + 1 || 1;
              msg.count = this.uid[msg.uid];
              return this.m("view", msg);
            },{
            Severity: Major
            Found in prototypes/fluxions/count_setImmediate.js and 3 other locations - About 3 hrs to fix
            prototypes/fluxions/count_chain.js on lines 4..10
            prototypes/fluxions/count_nextTick.js on lines 4..10
            prototypes/fluxions/count_setTimeout.js on lines 4..10

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

            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("input", function(msg){
              this.uid[msg.uid] = this.uid[msg.uid] + 1 || 1;
              msg.count = this.uid[msg.uid];
              return this.m("view", msg);
            },{
            Severity: Major
            Found in prototypes/fluxions/count_chain.js and 3 other locations - About 3 hrs to fix
            prototypes/fluxions/count_nextTick.js on lines 4..10
            prototypes/fluxions/count_setImmediate.js on lines 4..10
            prototypes/fluxions/count_setTimeout.js on lines 4..10

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

            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

              ctx.lineTo(
                t[p + 'x'] - v.x * (t[p + 'size'] + 5) - v.y * 5,
                t[p + 'y'] - v.y * (t[p + 'size'] + 5) + v.x * 5
              )
            Severity: Major
            Found in prototypes/express/src/console/script.js and 1 other location - About 3 hrs to fix
            prototypes/express/src/console/script.js on lines 231..234

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

            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

              ctx.lineTo(
                t[p + 'x'] - v.x * (t[p + 'size'] + 5) + v.y * 5,
                t[p + 'y'] - v.y * (t[p + 'size'] + 5) - v.x * 5
              )
            Severity: Major
            Found in prototypes/express/src/console/script.js and 1 other location - About 3 hrs to fix
            prototypes/express/src/console/script.js on lines 226..229

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

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

                function bindCaptor(captor) {
                  var nodes,
                      over = {};
            
                  function onClick(e) {

              Function data has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                d3_selectionPrototype.data = function(value, key) {
                  var i = -1, n = this.length, group, node;
                  if (!arguments.length) {
                    value = new Array(n = (group = this[0]).length);
                    while (++i < n) {
              Severity: Major
              Found in lib/graph-printer/old/bower_components/d3/d3.js - About 3 hrs to fix

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

                    function d3_time_parseMonth(date, string, i) {
                      d3_time_monthRe.lastIndex = 0;
                      var n = d3_time_monthRe.exec(string.substring(i));
                      return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
                    }
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js and 3 other locations - About 3 hrs to fix
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2586..2590
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2591..2595
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2596..2600

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

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

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

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

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

                Refactorings

                Further Reading

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

                    function d3_time_parseWeekdayAbbrev(date, string, i) {
                      d3_time_dayAbbrevRe.lastIndex = 0;
                      var n = d3_time_dayAbbrevRe.exec(string.substring(i));
                      return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
                    }
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js and 3 other locations - About 3 hrs to fix
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2591..2595
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2596..2600
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2601..2605

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

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

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

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

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

                Refactorings

                Further Reading

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

                    function d3_time_parseWeekday(date, string, i) {
                      d3_time_dayRe.lastIndex = 0;
                      var n = d3_time_dayRe.exec(string.substring(i));
                      return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
                    }
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js and 3 other locations - About 3 hrs to fix
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2586..2590
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2596..2600
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2601..2605

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

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

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

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

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

                Refactorings

                Further Reading

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

                    function d3_time_parseMonthAbbrev(date, string, i) {
                      d3_time_monthAbbrevRe.lastIndex = 0;
                      var n = d3_time_monthAbbrevRe.exec(string.substring(i));
                      return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
                    }
                Severity: Major
                Found in lib/graph-printer/old/bower_components/d3/d3.js and 3 other locations - About 3 hrs to fix
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2586..2590
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2591..2595
                lib/graph-printer/old/bower_components/d3/d3.js on lines 2601..2605

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

                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