etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

Function Context has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Context (ast, filename, dirname, root) {
  // + The filename
  this.name = filename;
  this.dirname = dirname;
  this.root = root;
Severity: Major
Found in lib/analyzer/context.js - About 5 hrs to fix

    Function bounds has 126 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      d3.geo.bounds = function() {
        var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;
        var bound = {
          point: point,
          lineStart: lineStart,
    Severity: Major
    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 5 hrs to fix

      Function graph has 126 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function graph(ctx, code) {
        var tagsByLine = [], nbLines;
        code = String(code).split('\n');
        nbLines = code.length;
      
      
      Severity: Major
      Found in lib/graph-inspector-printer/graph.js - About 5 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                    if ( event.pageX == null && original.clientX != null ) {
                        eventDoc = event.target.ownerDocument || document;
                        doc = eventDoc.documentElement;
                        body = eventDoc.body;
        
        
        Severity: Critical
        Found in test-set/gifsockets-server-master/public/js/jquery.js - About 5 hrs to fix

          Function generateRoutes has 124 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Overview.prototype.generateRoutes = function() {
                this.express.get('/generate', (function(_this) {
                  return function(req, res) {
                    var _ref;
                    if ((_ref = _this.initStatus) != null ? _ref.initializing : void 0) {
          Severity: Major
          Found in test-set/redis_key_overview-master/modules/keyoverview.js - About 4 hrs to fix

            File sigma.core.js has 371 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            ;(function(undefined) {
              'use strict';
            
              var __instances = {};
            
            
            Severity: Minor
            Found in prototypes/express/src/console/sigma/src/sigma.core.js - About 4 hrs to fix

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

              function runFactory(code, name) {
                var script = vm.createScript('__result = (' + code + ').call(this, __arguments)', name);
                return {
                  run : function(scopes, arguments) {
                    scopes.__arguments = arguments;
              Severity: Major
              Found in prototypes/zeromq/src/old/worker.js and 1 other location - About 4 hrs to fix
              prototypes/zeromq/src/flx-node.js on lines 40..54

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

              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

              function runFactory(code, name) {
                var script = vm.createScript('__result = (' + code + ').call(this, __arguments)', name);
                return {
                  run : function(scopes, arguments) {
                    scopes.__arguments = arguments;
              Severity: Major
              Found in prototypes/zeromq/src/flx-node.js and 1 other location - About 4 hrs to fix
              prototypes/zeromq/src/old/worker.js on lines 38..52

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

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

                d3.svg.axis = function() {
                  var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;
                  function axis(g) {
                    g.each(function() {
                      var g = d3.select(this);
              Severity: Major
              Found in lib/graph-printer/old/bower_components/d3/d3.js - About 4 hrs to fix

                File sigma.classes.graph.js has 370 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                ;(function(undefined) {
                  'use strict';
                
                  var _methods = Object.create(null),
                      _indexes = Object.create(null),

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

                  module.exports = function(grunt) {
                    var coreJsFiles = [
                      // Core:
                      'src/sigma.core.js',
                  
                  
                  Severity: Major
                  Found in prototypes/express/src/console/sigma/Gruntfile.js - About 4 hrs to fix

                    Function support has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    jQuery.support = (function() {
                    
                        var support, all, a,
                            input, select, fragment,
                            opt, eventName, isSupported, i,
                    Severity: Major
                    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 4 hrs to fix

                      Function addEdge has 119 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 build has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function build(tree) {
                        
                        
                          _down = {};
                          _up = {};
                        Severity: Minor
                        Found in prototypes/blender.old/lib/build.js - About 4 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

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

                        function ackNode(id, msg) {
                          if (!nodes[id]) {
                            nodes[id] = default_node();
                            setTimeout(registered, 0, id);
                          }
                        Severity: Major
                        Found in prototypes/zeromq/src/flx-router.js and 1 other location - About 4 hrs to fix
                        prototypes/zeromq/src/old/main.js on lines 45..59

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

                        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 ackNode(id, msg) {
                          if (!nodes[id]) {
                            nodes[id] = default_node();
                            setTimeout(registered, 0, id);
                          }
                        Severity: Major
                        Found in prototypes/zeromq/src/old/main.js and 1 other location - About 4 hrs to fix
                        prototypes/zeromq/src/flx-router.js on lines 53..67

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

                        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

                              request.post(host + href, function(error, response, body) {
                                error = error || (response.statusCode === 200 ? '' : body);
                                results.push({
                                  timbit: name,
                                  href: href,
                        Severity: Major
                        Found in test-set/timbits-master/lib/timbits.js and 1 other location - About 4 hrs to fix
                        test-set/timbits-master/lib/timbits.js on lines 542..554

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

                        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

                              request(host + href, function(error, response, body) {
                                error = error || (response.statusCode === 200 ? '' : body);
                                results.push({
                                  timbit: name,
                                  href: href,
                        Severity: Major
                        Found in test-set/timbits-master/lib/timbits.js and 1 other location - About 4 hrs to fix
                        test-set/timbits-master/lib/timbits.js on lines 557..569

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

                        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 (y) {
                                  if (yExtentDomain) {
                                    y0 = yExtentDomain[0], y1 = yExtentDomain[1];
                                  } else {
                                    y0 = yExtent[0], y1 = yExtent[1];
                        Severity: Major
                        Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 4 hrs to fix
                        lib/graph-printer/old/bower_components/d3/d3.js on lines 8996..9004

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

                        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 (x) {
                                  if (xExtentDomain) {
                                    x0 = xExtentDomain[0], x1 = xExtentDomain[1];
                                  } else {
                                    x0 = xExtent[0], x1 = xExtent[1];
                        Severity: Major
                        Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 4 hrs to fix
                        lib/graph-printer/old/bower_components/d3/d3.js on lines 9005..9013

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

                        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