etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

Function post has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function post(msg) {

  function postMsg(msg) {
    if (!msg)
      return false;
Severity: Minor
Found in prototypes/fluxions/lib/flx_chain.js - About 1 hr 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 partition has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.layout.partition = function() {
    var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];
    function position(node, x, dx, dy) {
      var children = node.children;
      node.x = x;
Severity: Minor
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

    Function dragstart has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function dragstart(id, position, subject, move, end) {
          return function() {
            var that = this, target = d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = ".drag" + (dragId == null ? "" : "-" + dragId), dragOffset, dragSubject = d3.select(subject()).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(), position0 = position(parent, dragId);
            if (origin) {
              dragOffset = origin.apply(that, arguments);
    Severity: Minor
    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

      Function dispatch has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          dispatch: function( event ) {
      
              // Make a writable jQuery.Event from the native event object
              event = jQuery.event.fix( event );
      
      
      Severity: Minor
      Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

        Function clone has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                var destElements, node, clone, i, srcElements,
                    inPage = jQuery.contains( elem.ownerDocument, elem );
        
                if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
        Severity: Minor
        Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

          Function access has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
                  var i = 0,
                      length = elems.length,
                      bulk = key == null;
          
          
          Severity: Minor
          Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

            Function _loop has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function _loop() {
                var k,
                    o,
                    l,
                    job,
            Severity: Minor
            Found in prototypes/express/src/console/sigma/src/conrad.js - About 1 hr to fix

              Function multiply has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                sigma.utils.matrices.multiply = function(a, b, m2) {
                  var l = m2 ? 2 : 3,
                      a00 = a[0 * l + 0],
                      a01 = a[0 * l + 1],
                      a02 = a[0 * l + 2],
              Severity: Minor
              Found in prototypes/express/src/console/sigma/src/utils/sigma.utils.js - About 1 hr to fix

                Function _killJob has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function _killJob(v1) {
                    var i,
                        l,
                        k,
                        a,
                Severity: Minor
                Found in prototypes/express/src/console/sigma/src/conrad.js - About 1 hr to fix

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

                      if (!Object.keys(this.allNeighborsIndex[edge.target][edge.source]).length)
                        delete this.allNeighborsIndex[edge.target][edge.source];
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 536..537
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 540..541
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 544..545

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

                  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

                  module.exports = {
                    hash: hash,
                    salt: salt,
                    extractSalt: extractSalt,
                    idFinder: idFinder,
                  Severity: Major
                  Found in prototypes/blender/lib/helpers.js and 1 other location - About 1 hr to fix
                  prototypes/shreder/lib/helpers.js on lines 3..11

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

                  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

                      if (!Object.keys(this.allNeighborsIndex[edge.source][edge.target]).length)
                        delete this.allNeighborsIndex[edge.source][edge.target];
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 536..537
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 540..541
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 548..549

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

                  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

                      if (!Object.keys(this.outNeighborsIndex[edge.source][edge.target]).length)
                        delete this.outNeighborsIndex[edge.source][edge.target];
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 536..537
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 544..545
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 548..549

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

                  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

                  module.exports = {
                    hash: hash,
                    salt: salt,
                    extractSalt: extractSalt,
                    idFinder: idFinder,
                  Severity: Major
                  Found in prototypes/shreder/lib/helpers.js and 1 other location - About 1 hr to fix
                  prototypes/blender/lib/helpers.js on lines 3..11

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

                  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

                      if (!Object.keys(this.inNeighborsIndex[edge.target][edge.source]).length)
                        delete this.inNeighborsIndex[edge.target][edge.source];
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 540..541
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 544..545
                  prototypes/express/src/console/sigma/src/classes/sigma.classes.graph.js on lines 548..549

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

                  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

                      brush.x = function(z) {
                        if (!arguments.length) return x;
                        x = z;
                        resizes = d3_svg_brushResizes[!x << 1 | !y];
                        return brush;
                  Severity: Major
                  Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 1 hr to fix
                  lib/graph-printer/old/bower_components/d3/d3.js on lines 8982..8987

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

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

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

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

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

                  Refactorings

                  Further Reading

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

                      if (_name[1] == ',') {
                        _output += '  ' + _name.replace(',', '') + ' [label="' + _name + '"] ';
                        _name = _name.replace(',', '');
                      }
                  Severity: Major
                  Found in prototypes/recast/main.js and 1 other location - About 1 hr to fix
                  prototypes/recast/main.js on lines 39..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 63.

                  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

                      brush.y = function(z) {
                        if (!arguments.length) return y;
                        y = z;
                        resizes = d3_svg_brushResizes[!x << 1 | !y];
                        return brush;
                  Severity: Major
                  Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 1 hr to fix
                  lib/graph-printer/old/bower_components/d3/d3.js on lines 8976..8981

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

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

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

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

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

                  Refactorings

                  Further Reading

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

                      if (_to[1] == ',') {
                        _output += '  ' + _to.replace(',', '') + ' [label="' + _to + '"] ';
                        _to = _to.replace(',', '');
                      }
                  Severity: Major
                  Found in prototypes/recast/main.js and 1 other location - About 1 hr to fix
                  prototypes/recast/main.js on lines 35..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 63.

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

                    function d3_geom_voronoiRemoveBeach(beach) {
                      var circle = beach.circle, x = circle.x, y = circle.cy, vertex = {
                        x: x,
                        y: y
                      }, previous = beach.P, next = beach.N, disappearing = [ beach ];
                  Severity: Minor
                  Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language