etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

try {
  var hooks = require('./hooks')
} catch(err) {
  // For debug purpose
  // console.log("No hooks module found, fallback to debug");
Severity: Major
Found in prototypes/fluxions/lib/flx_setTimeout.js and 3 other locations - About 1 hr to fix
prototypes/fluxions/lib/flx.js on lines 4..17
prototypes/fluxions/lib/flx_chain.js on lines 4..17
prototypes/fluxions/lib/flx_nextTick.js on lines 4..17

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

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

try {
  var hooks = require('./hooks')
} catch(err) {
  // For debug purpose
  // console.log("No hooks module found, fallback to debug");
Severity: Major
Found in prototypes/fluxions/lib/flx_chain.js and 3 other locations - About 1 hr to fix
prototypes/fluxions/lib/flx.js on lines 4..17
prototypes/fluxions/lib/flx_nextTick.js on lines 4..17
prototypes/fluxions/lib/flx_setTimeout.js on lines 4..17

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

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

try {
  var hooks = require('./hooks')
} catch(err) {
  // For debug purpose
  // console.log("No hooks module found, fallback to debug");
Severity: Major
Found in prototypes/fluxions/lib/flx_nextTick.js and 3 other locations - About 1 hr to fix
prototypes/fluxions/lib/flx.js on lines 4..17
prototypes/fluxions/lib/flx_chain.js on lines 4..17
prototypes/fluxions/lib/flx_setTimeout.js on lines 4..17

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

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

    graticule.extent = function(_) {
      if (!arguments.length) return graticule.minorExtent();
      return graticule.majorExtent(_).minorExtent(_);
    };
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 4440..4443

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

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 (dep.to === id && dep.type === "VariableDeclarator") {
      // clean the graph from free nodes
      // TODO there might be more than one node to clean
      tree.nodes = tree.nodes.filter(function(node) {
        return !(node.id === dep.id);
Severity: Major
Found in prototypes/blender/lib/extract.js and 1 other location - About 1 hr to fix
prototypes/blender.old/index.js on lines 188..196

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

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 ( jQuery.isFunction( html ) ) {
            return this.each(function(i) {
                jQuery(this).wrapAll( html.call(this, i) );
            });
        }
Severity: Major
Found in test-set/gifsockets-server-master/public/js/jquery.js and 1 other location - About 1 hr to fix
test-set/gifsockets-server-master/public/js/jquery.js on lines 5913..5917

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

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

    graticule.step = function(_) {
      if (!arguments.length) return graticule.minorStep();
      return graticule.majorStep(_).minorStep(_);
    };
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 4420..4423

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

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 ( jQuery.isFunction( html ) ) {
            return this.each(function(i) {
                jQuery(this).wrapInner( html.call(this, i) );
            });
        }
Severity: Major
Found in test-set/gifsockets-server-master/public/js/jquery.js and 1 other location - About 1 hr to fix
test-set/gifsockets-server-master/public/js/jquery.js on lines 5884..5888

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

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 (dep.to === _var[0].id && dep.type === "VariableDeclarator") {
        // clean the graph from free nodes
        // TODO there might be more than one node to clean
        argChain.nodes = argChain.nodes.filter(function(node) {
          return !(node.id === dep.id);
Severity: Major
Found in prototypes/blender.old/index.js and 1 other location - About 1 hr to fix
prototypes/blender/lib/extract.js on lines 12..20

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

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

    off: function( types, selector, fn ) {
        var handleObj, type;
        if ( types && types.preventDefault && types.handleObj ) {
            // ( event )  dispatched jQuery.Event
            handleObj = types.handleObj;
Severity: Minor
Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

    Function offset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jQuery.fn.offset = function( options ) {
        if ( arguments.length ) {
            return options === undefined ?
                this :
                this.each(function( i ) {
    Severity: Minor
    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

      Function populateSessionWithUser has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function populateSessionWithUser(cb) {
            return function(err, body, headers) {
              if (err) { return cb(err); }
      
              getUserName(body.name, headers['set-cookie'], function(err, name) {
      Severity: Minor
      Found in test-set/express-couchUser-master/index.js - About 1 hr to fix

        Function exposeCallback has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          return function exposeCallback(rpcInstance) {
            var chnlName = 'MR-' + modelName; //prefix MR stands for Moonridge
            rpcInstance.expose(chnlName, channel, opts.authFn);
            var chnlSocket = rpcInstance.channels[chnlName]._socket;
        
        
        Severity: Minor
        Found in test-set/Moonridge-master/mr-rpc-methods.js - About 1 hr to fix

          Function keydown has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            , keydown: function (e) {
                var $this
                  , $items
                  , $active
                  , $parent
          Severity: Minor
          Found in test-set/gifsockets-server-master/public/js/bootstrap.js - About 1 hr to fix

            Function setupClipboard has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function setupClipboard(element, opts) {
            
                    if (!FileReaderJS.enabled) {
                        return;
                    }
            Severity: Minor
            Found in test-set/gifsockets-server-master/public/js/filereader.js - About 1 hr to fix

              Function _resolve has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function _resolve(tree, forest) {
              
                // console.log(forest);
              
                tree.deps.every(function(dep) {
              Severity: Minor
              Found in prototypes/blender.old/lib/resolution.js - About 1 hr to fix

                Function splitSquare has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    splitSquare: function(b) {
                      return [
                        [
                          {x: b.x, y: b.y},
                          {x: b.x + b.width / 2, y: b.y},

                  Function _executeFirstJob has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Function resize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      sigma.renderers.canvas.prototype.resize = function(w, h) {
                        var k,
                            oldWidth = this.width,
                            oldHeight = this.height,
                            pixelRatio = 1;

                      Function updateMassAndGeometry has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        forceatlas2.Region.prototype.updateMassAndGeometry = function() {
                          if (this.nodes.length > 1) {
                            // Compute Mass
                            var mass = 0;
                            var massSumX = 0;
                        Severity
                        Category
                        Status
                        Source
                        Language