etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

Function depTree has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function depTree() {

  var graphs = [];

  for (var i in this) {
Severity: Minor
Found in prototypes/blender.old/lib/graphviz.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 EventBus has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function EventBus() {
    var self = this;
    self.subscribers = {};  //TODO use node-hashtable here for better perf
    eventNames.forEach(function (name) {
        self.subscribers[name] = {};
Severity: Minor
Found in test-set/Moonridge-master/schema-events.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 ASCIIgraph has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function ASCIIgraph(name, mean, median, min, max, length) {

  mean = Math.floor(mean);
  median = Math.floor(median);
  min = Math.floor(min);
Severity: Minor
Found in prototypes/fluxions/bench/distribution/index.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

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

      var $this = $(this)
        , data = $this.data('modal')
        , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
Severity: Major
Found in test-set/gifsockets-server-master/public/js/bootstrap.js and 1 other location - About 1 hr to fix
test-set/gifsockets-server-master/public/js/bootstrap.js on lines 597..599

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

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 $this = $(this)
        , data = $this.data('collapse')
        , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
Severity: Major
Found in test-set/gifsockets-server-master/public/js/bootstrap.js and 1 other location - About 1 hr to fix
test-set/gifsockets-server-master/public/js/bootstrap.js on lines 1004..1006

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

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

    dsv.parseRows = function(text, f) {
      var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
      function token() {
        if (I >= N) return EOF;
        if (eol) return eol = false, EOL;
Severity: Minor
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

    Function point has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            point: function(λ, φ) {
              var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;
              if (!point0 && (v00 = v0 = v)) listener.lineStart();
              if (v !== v0) {
                point2 = intersect(point0, point1);
    Severity: Minor
    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

      Function d3_svg_line has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function d3_svg_line(projection) {
          var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
          function line(data) {
            var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
            function segment() {
      Severity: Minor
      Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

        Function d3_geo_pathBuffer has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function d3_geo_pathBuffer() {
            var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];
            var stream = {
              point: point,
              lineStart: function() {
        Severity: Minor
        Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

          Function options has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function options() {
            
              function javascript(arg) {
                this.jsOutput = arg;
              }
          Severity: Minor
          Found in lib/lib/interface.js - About 1 hr to fix

            Function pipe has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function pipe(compile) {
            
              var options = parseArgs(process.argv);
            
              if (!options.input) {
            Severity: Minor
            Found in lib/lib/interface.js - About 1 hr to fix

              Function ajaxHandleResponses has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ajaxHandleResponses( s, jqXHR, responses ) {
                  var firstDataType, ct, finalDataType, type,
                      contents = s.contents,
                      dataTypes = s.dataTypes,
                      responseFields = s.responseFields;
              Severity: Minor
              Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

                Function _getMemberCount has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        Overview.prototype._getMemberCount = function (keys, last) {
                          var _collection, _command, _commands, _i, _key, _len;
                          if (last) {
                            if (this.memberRequests.remaining === 0) {
                              this._getTopMembers(null, null, true);
                Severity: Minor
                Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

                  Function _wheelHandler has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function _wheelHandler(e) {
                        var pos,
                            count,
                            ratio,
                            newRatio;

                    Function fetch has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function fetch(gexf_url, callback) {
                        var xhr = (function() {
                          if (window.XMLHttpRequest)
                            return new XMLHttpRequest();
                    
                    

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

                      function d3_layout_hierarchyLinks(nodes) {
                        return d3.merge(nodes.map(function(parent) {
                          return (parent.children || []).map(function(child) {
                            return {
                              source: parent,
                      Severity: Major
                      Found in lib/graph-printer/pack-layout.js and 1 other location - About 1 hr to fix
                      lib/graph-printer/old/bower_components/d3/d3.js on lines 6415..6424

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

                      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_hierarchyLinks(nodes) {
                          return d3.merge(nodes.map(function(parent) {
                            return (parent.children || []).map(function(child) {
                              return {
                                source: parent,
                      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/pack-layout.js on lines 134..143

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

                      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 inspect() {
                              return this.name + "(" + this.id + ")[" + this.kind + "]" + (this.version ? ("[" + this.version + "]") : "");
                          }
                      Severity: Major
                      Found in prototypes/blender.old/lib/dependency.js and 1 other location - About 1 hr to fix
                      prototypes/blender/lib/constructors.js on lines 80..82

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

                      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 inspect() {
                              return this.name + "(" + this.id + ")[" + this.kind + "]" + (this.version ? ("[" + this.version + "]") : "");
                          }
                      Severity: Major
                      Found in prototypes/blender/lib/constructors.js and 1 other location - About 1 hr to fix
                      prototypes/blender.old/lib/dependency.js on lines 95..97

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

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

                          force.start = function() {
                            var i, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
                            for (i = 0; i < n; ++i) {
                              (o = nodes[i]).index = i;
                              o.weight = 0;
                      Severity: Minor
                      Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language