etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

      return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js and 2 other locations - About 1 hr to fix
lib/graph-printer/old/bower_components/d3/d3.js on lines 7791..7791
lib/graph-printer/old/bower_components/d3/d3.js on lines 8312..8312

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

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 3 locations. Consider refactoring.
Open

  var references = ctx.scopes
    .map(function (s) { return s.references; })
    .reduce(function(a, b) { return a.concat(b); }, [])
    .map(function (s) { return s.identifier.loc; })
Severity: Major
Found in lib/graph-inspector-printer/graph.js and 2 other locations - About 1 hr to fix
lib/graph-inspector-printer/graph.js on lines 38..41
lib/graph-inspector-printer/graph.js on lines 89..102

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

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 3 locations. Consider refactoring.
Open

    return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js and 2 other locations - About 1 hr to fix
lib/graph-printer/old/bower_components/d3/d3.js on lines 7791..7791
lib/graph-printer/old/bower_components/d3/d3.js on lines 7791..7791

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

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 3 locations. Consider refactoring.
Open

  var usedVariables = ctx.scopes
    .map(function (s) { return s.references; })
    .reduce(function(a, b) { return a.concat(b); }, [])
    .map(function (s) {
      return {
Severity: Major
Found in lib/graph-inspector-printer/graph.js and 2 other locations - About 1 hr to fix
lib/graph-inspector-printer/graph.js on lines 38..41
lib/graph-inspector-printer/graph.js on lines 44..47

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

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

    zoom.center = function(_) {
      if (!arguments.length) return center;
      center = _ && [ +_[0], +_[1] ];
      return zoom;
    };
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 1297..1301

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

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

    m.translate = function() {
      var v = translate.apply(m, arguments);
      return v === m ? clipAuto ? m.clipExtent(null) : m : v;
    };
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 4635..4638

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

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

    zoom.size = function(_) {
      if (!arguments.length) return size;
      size = _ && [ +_[0], +_[1] ];
      return zoom;
    };
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 1292..1296

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

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

      } else {
        if (!va) va = {
          x: fx,
          y: y1
        }; else if (va.y < y0) return;
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 5029..5038

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

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

  return ("i" + str).replace(/\+/g, 'plus')
                    .replace(/\-\_/g, 'minus_')
                    .replace(/\-/g, '_')
                    .replace(/>/g, '')
                    .replace(/\//g, '')
Severity: Major
Found in prototypes/shreder/lib/graphviz.js and 1 other location - About 1 hr to fix
prototypes/blender/lib/graphviz.js on lines 7..12

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

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

    m.scale = function() {
      var v = scale.apply(m, arguments);
      return v === m ? clipAuto ? m.clipExtent(null) : m : v;
    };
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 4639..4642

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

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

  function d3_scale_quantize(x0, x1, range) {
    var kx, i;
    function scale(x) {
      return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
    }
Severity: Minor
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

    Function parseParams has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function parseParams(req, parseCb) {
        var rule
          , ruleFn
          , normalParam;
    
    
    Severity: Minor
    Found in test-set/express-endpoint-master/lib/middleware/params.js - About 1 hr to fix

      Function html has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          html: function( value ) {
              return jQuery.access( this, function( value ) {
                  var elem = this[0] || {},
                      i = 0,
                      l = this.length;
      Severity: Minor
      Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

        Function addClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            addClass: function( value ) {
                var classes, elem, cur, clazz, j,
                    i = 0,
                    len = this.length,
                    proceed = typeof value === "string" && value;
        Severity: Minor
        Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

          Function removeClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              removeClass: function( value ) {
                  var classes, elem, cur, clazz, j,
                      i = 0,
                      len = this.length,
                      proceed = arguments.length === 0 || typeof value === "string" && value;
          Severity: Minor
          Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

            Function placeholder has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function placeholder(name, next) {
              return b.functionExpression(b.identifier(name), [
                  b.identifier("req"),
                  b.identifier("res")
                ],
            Severity: Minor
            Found in prototypes/blender.old/lib/builders.js - About 1 hr to fix

              Function buildAttraction has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    buildAttraction: function(logAttr, distributedAttr, adjustBySize, c) {
                      if (adjustBySize) {
                        if (logAttr) {
                          if (distributedAttr) {
                            return new this.logAttraction_degreeDistributed_antiCollision(c);

                Function def has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  sigma.canvas.edges.def = function(edge, source, target, context, settings) {
                    var color = edge.color,
                        prefix = settings('prefix') || '',
                        edgeColor = settings('edgeColor'),
                        defaultNodeColor = settings('defaultNodeColor'),

                  Function floatColor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    sigma.utils.floatColor = function(val) {
                      var result = [0, 0, 0];
                  
                      if (val.match(/^#/)) {
                        val = (val || '').replace(/^#/, '');
                  Severity: Minor
                  Found in prototypes/express/src/console/sigma/src/utils/sigma.utils.js - About 1 hr to fix

                    Function placeholder has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function placeholder(name, next) {
                      return b.functionExpression(b.identifier(name), [
                          b.identifier("req"),
                          b.identifier("res")
                        ],
                    Severity: Minor
                    Found in prototypes/blender/lib/templates.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language