etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

Function showHide has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function showHide( elements, show ) {
    var display, elem, hidden,
        values = [],
        index = 0,
        length = elements.length;
Severity: Minor
Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

    Function _diffKeysAndSummarize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Overview.prototype._diffKeysAndSummarize = function(collection, last) {
          var k, v, _element, _i, _len, _ref;
          if (last) {
            this.emit('initStatusUpdate', "Finished getting the necessary key information from redis.");
            this._createKeyOverview();
    Severity: Minor
    Found in test-set/redis_key_overview-master/modules/keyoverview.js - About 1 hr to fix

      Function _diffKeysAndSummarize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              Overview.prototype._diffKeysAndSummarize = function (collection, last) {
                var k, v, _element, _i, _len, _ref;
                if (last) {
                  this.emit('initStatusUpdate', 'Finished getting the necessary key information from redis.');
                  this._createKeyOverview();
      Severity: Minor
      Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

        Function post has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function post(msg) {
        
          function postMsg(type, body, ctx) {
              var msg = MSG[type].flx.call(ctx, body);
        
        
        Severity: Minor
        Found in prototypes/express/src/old/fluxion2.js - About 1 hr to fix

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

          function customFinder(obj) {
            return function(_node) {
              for (var i in obj) { var node = obj[i];
                if (_node[i] !== obj[i])
                  return false;
          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 60..68

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

          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

              if (w !== undefined && h !== undefined) {
                this.width = w;
                this.height = h;
              } else {
                this.width = this.container.offsetWidth;
          prototypes/express/src/console/sigma/src/renderers/sigma.renderers.canvas.js on lines 313..322

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

          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 customFinder(obj) {
            return function(_node) {
              for (var i in obj) { var node = obj[i];
                if (_node[i] !== obj[i])
                  return false;
          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 60..68

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

          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

              if (w !== undefined && h !== undefined) {
                this.width = w;
                this.height = h;
              } else {
                this.width = this.container.offsetWidth;
          prototypes/express/src/console/sigma/src/renderers/sigma.renderers.webgl.js on lines 487..496

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

          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

              stack.order = function(x) {
                if (!arguments.length) return order;
                order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
                return stack;
              };
          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 6545..6549

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

          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

              stack.offset = function(x) {
                if (!arguments.length) return offset;
                offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
                return stack;
              };
          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 6540..6544

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

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

              when: function( subordinate /* , ..., subordinateN */ ) {
                  var i = 0,
                      resolveValues = core_slice.call( arguments ),
                      length = resolveValues.length,
          
          
          Severity: Minor
          Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

            Function isLowerSorted has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var isLowerSorted = function isLowerSorted(first, second) {
                    var i = 0;
                    var prop = sortBy[0];
                    var firstVal;
                    var secondVal;
            Severity: Minor
            Found in test-set/Moonridge-master/utils/indexInSortedArray.js - About 1 hr to fix

              Function _upHandler has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _upHandler(e) {
                    if (_settings('mouseEnabled') && _isMouseDown) {
                      _isMouseDown = false;
                      if (_movingTimeoutId)
                        clearTimeout(_movingTimeoutId);

                Function configurable has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  var configurable = function() {
                    var i,
                        l,
                        data = {},
                        datas = Array.prototype.slice.call(arguments, 0);

                  Function drawHovers has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    sigma.misc.drawHovers = function(prefix) {
                      var self = this,
                          hoveredNodes = {};
                  
                      this.bind('overNodes', function(event) {

                    Function render has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        render: function(gl, program, data, params) {
                          var buffer;
                    
                          // Define attributes:
                          var colorLocation =

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

                      TriggersDict.prototype.typeOf = function(ids) {
                      
                        /* TODO heavy redesign needed here
                         * Triggers won't do the job.
                         * the start / post difference comes from the routes, or the method, not the trigger.
                      Severity: Minor
                      Found in lib/analyzer/triggers.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 render has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Timbit.prototype.render = function(req, res, context) {
                      
                        // add caching headers
                        res.setHeader("Cache-Control", "max-age=" + context.maxAge);
                        res.setHeader("Edge-Control", "!no-store, max-age=" + context.maxAge);
                      Severity: Minor
                      Found in test-set/timbits-master/lib/timbits.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 toContext has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                      sigma.canvas.edges.toContext = function(e, s, t, ctx, settings) {
                        var p = settings('prefix') || '',
                            edgeColor = settings('edgeColor'),
                            defaultNodeColor = settings('defaultNodeColor'),
                            defaultEdgeColor = settings('defaultEdgeColor'),
                      Severity: Minor
                      Found in prototypes/express/src/console/script.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 _resolve has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function _resolve(tree, forest) {
                        var clean = tree.deps.reduce(function(clean, dep) { var _tree = forest[dep.id];
                          // If there is a scope with this id : it needs to be resolved    
                          if (_tree) {
                            if (!_types[dep.type])
                      Severity: Minor
                      Found in prototypes/blender/lib/resolution.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

                      Severity
                      Category
                      Status
                      Source
                      Language