etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

function HelloWorld(msg) {
  return b.functionExpression(b.identifier("HelloWorld"), [
      b.identifier("msg")
    ],
    b.blockStatement([
Severity: Major
Found in prototypes/blender/lib/templates.js and 5 other locations - About 3 hrs to fix
prototypes/blender.old/lib/builders.js on lines 102..122
prototypes/blender.old/lib/builders.js on lines 124..144
prototypes/blender/lib/templates.js on lines 102..122
prototypes/shreder/lib/builders.js on lines 227..247
prototypes/shreder/lib/builders.js on lines 249..269

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

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

function flxSimple(msg) {
  return b.functionExpression(b.identifier("fn"), [
      b.identifier("msg")
    ],
    b.blockStatement([
Severity: Major
Found in prototypes/blender.old/lib/builders.js and 5 other locations - About 3 hrs to fix
prototypes/blender.old/lib/builders.js on lines 124..144
prototypes/blender/lib/templates.js on lines 102..122
prototypes/blender/lib/templates.js on lines 124..144
prototypes/shreder/lib/builders.js on lines 227..247
prototypes/shreder/lib/builders.js on lines 249..269

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

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 (fx[addr]) {
    fx[addr].fn = fn || fx[addr].fn;
    fx[addr].node = node || fx[addr].node;

    if (fx[addr].transition) {
Severity: Major
Found in prototypes/zeromq/src/old/main.js and 1 other location - About 3 hrs to fix
prototypes/zeromq/src/flx-router.js on lines 95..106

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

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 (fx[addr]) {
    fx[addr].fn = fn || fx[addr].fn;
    fx[addr].node = node || fx[addr].node;

    if (fx[addr].transition) {
Severity: Major
Found in prototypes/zeromq/src/flx-router.js and 1 other location - About 3 hrs to fix
prototypes/zeromq/src/old/main.js on lines 80..90

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

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

function HelloWorld(msg) {
  return b.functionExpression(b.identifier("HelloWorld"), [
      b.identifier("msg")
    ],
    b.blockStatement([
Severity: Major
Found in prototypes/blender.old/lib/builders.js and 5 other locations - About 3 hrs to fix
prototypes/blender.old/lib/builders.js on lines 102..122
prototypes/blender/lib/templates.js on lines 102..122
prototypes/blender/lib/templates.js on lines 124..144
prototypes/shreder/lib/builders.js on lines 227..247
prototypes/shreder/lib/builders.js on lines 249..269

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

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

function flxSimple(msg) {
  return b.functionExpression(b.identifier("fn"), [
      b.identifier("msg")
    ],
    b.blockStatement([
Severity: Major
Found in prototypes/shreder/lib/builders.js and 5 other locations - About 3 hrs to fix
prototypes/blender.old/lib/builders.js on lines 102..122
prototypes/blender.old/lib/builders.js on lines 124..144
prototypes/blender/lib/templates.js on lines 102..122
prototypes/blender/lib/templates.js on lines 124..144
prototypes/shreder/lib/builders.js on lines 249..269

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

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

function flxSimple(msg) {
  return b.functionExpression(b.identifier("fn"), [
      b.identifier("msg")
    ],
    b.blockStatement([
Severity: Major
Found in prototypes/blender/lib/templates.js and 5 other locations - About 3 hrs to fix
prototypes/blender.old/lib/builders.js on lines 102..122
prototypes/blender.old/lib/builders.js on lines 124..144
prototypes/blender/lib/templates.js on lines 124..144
prototypes/shreder/lib/builders.js on lines 227..247
prototypes/shreder/lib/builders.js on lines 249..269

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

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

timbit.params = {
  site: {
    description: 'The Wordpress site to query',
    required: true,
    strict: false,
Severity: Major
Found in test-set/timbits-master/examples/timbits/chocolate.js and 1 other location - About 3 hrs to fix
test-set/timbits-master/examples/timbits/dutchie.js on lines 26..46

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

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

timbit.params = {
  site: {
    description: 'The Wordpress site to query',
    required: true,
    strict: false,
Severity: Major
Found in test-set/timbits-master/examples/timbits/dutchie.js and 1 other location - About 3 hrs to fix
test-set/timbits-master/examples/timbits/chocolate.js on lines 26..46

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

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

exports = module.exports = function(options) {
  var config = merge({
    rules: {},
    parameters: []
  }, options)
Severity: Major
Found in test-set/express-endpoint-master/lib/middleware/params.js - About 3 hrs to fix

    Function trigger has 86 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        trigger: function( event, data, elem, onlyHandlers ) {
            var handle, ontype, cur,
                bubbleType, special, tmp, i,
                eventPath = [ elem || document ],
                type = core_hasOwn.call( event, "type" ) ? event.type : event,
    Severity: Major
    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 3 hrs to fix

      Function _next has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function _next(tree, chain, node) {
      
        // TODO What about building this fucking _next function so I don't have to pass these tree and chain as arguments every fucking time !
      
        // console.log(">> ", node, node.kind);
      Severity: Major
      Found in prototypes/blender.old/index.js - About 3 hrs to fix

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

          d3_time.second = d3_time_interval(function(date) {
            return new d3_date(Math.floor(date / 1e3) * 1e3);
          }, function(date, offset) {
            date.setTime(date.getTime() + Math.floor(offset) * 1e3);
          }, function(date) {
        Severity: Major
        Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 3 hrs to fix
        lib/graph-printer/old/bower_components/d3/d3.js on lines 9078..9084

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

        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

          d3_time.minute = d3_time_interval(function(date) {
            return new d3_date(Math.floor(date / 6e4) * 6e4);
          }, function(date, offset) {
            date.setTime(date.getTime() + Math.floor(offset) * 6e4);
          }, function(date) {
        Severity: Major
        Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 3 hrs to fix
        lib/graph-printer/old/bower_components/d3/d3.js on lines 9069..9075

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

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

        function Animation( elem, properties, options ) {
            var result,
                stopped,
                index = 0,
                length = animationPrefilters.length,
        Severity: Major
        Found in test-set/gifsockets-server-master/public/js/jquery.js - About 3 hrs to fix

          Function serve has 84 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          this.serve = function(options) {
              
            /* configure options */
            for (var key in options) {
              value = options[key];
          Severity: Major
          Found in test-set/timbits-master/lib/timbits.js - About 3 hrs to fix

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

              function d3_svg_lineStepAfter(points) {
                var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
                while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
                return path.join("");
              }
            Severity: Major
            Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 3 hrs to fix
            lib/graph-printer/old/bower_components/d3/d3.js on lines 7911..7915

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

            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_svg_lineStepBefore(points) {
                var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
                while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
                return path.join("");
              }
            Severity: Major
            Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 3 hrs to fix
            lib/graph-printer/old/bower_components/d3/d3.js on lines 7916..7920

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

            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

                    getTestValues(param.values, alltests).forEach(function(value) {
                      if (required.length === 0)
                        queries.push(name + "=" + value);
                      else
                        required.forEach(function(item) {
            Severity: Major
            Found in test-set/timbits-master/lib/timbits.js and 1 other location - About 3 hrs to fix
            test-set/timbits-master/lib/timbits.js on lines 467..474

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

            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

                  getTestValues(param.values, alltests).forEach(function(value) {
                    if (required.length === 0)
                      temp.push(name + "=" + value);
                    else
                      required.forEach(function(item) {
            Severity: Major
            Found in test-set/timbits-master/lib/timbits.js and 1 other location - About 3 hrs to fix
            test-set/timbits-master/lib/timbits.js on lines 490..497

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

            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