dockyard/es6_module_transpiler-rails

View on GitHub

Showing 225 of 225 total issues

Function 1 has 4426 lines of code (exceeds 25 allowed). Consider refactoring.
Open

!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.ModuleTranspiler=e():"undefined"!=typeof global?global.ModuleTranspiler=e():"undefined"!=typeof self&&(self.ModuleTranspiler=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*
  Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>
  Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
  Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
Severity: Major
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 wks to fix

    File es6-module-transpiler.js has 5917 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Copyright 2012 Traceur Authors.
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    Severity: Major
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 wks to fix

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

      var $__superDescriptor = function(proto, name) {
        if (!proto) throw new TypeError('super is null');
        return Object.getPropertyDescriptor(proto, name);
      }, $__superCall = function(self, proto, name, args) {
        var descriptor = $__superDescriptor(proto, name);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 2 days to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6362..6395
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6503..6536
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6614..6647
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 7072..7105

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

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

      var $__superDescriptor = function(proto, name) {
        if (!proto) throw new TypeError('super is null');
        return Object.getPropertyDescriptor(proto, name);
      }, $__superCall = function(self, proto, name, args) {
        var descriptor = $__superDescriptor(proto, name);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 2 days to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6227..6260
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6362..6395
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6503..6536
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 7072..7105

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

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

      var $__superDescriptor = function(proto, name) {
        if (!proto) throw new TypeError('super is null');
        return Object.getPropertyDescriptor(proto, name);
      }, $__superCall = function(self, proto, name, args) {
        var descriptor = $__superDescriptor(proto, name);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 2 days to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6227..6260
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6362..6395
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6503..6536
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6614..6647

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

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

      var $__superDescriptor = function(proto, name) {
        if (!proto) throw new TypeError('super is null');
        return Object.getPropertyDescriptor(proto, name);
      }, $__superCall = function(self, proto, name, args) {
        var descriptor = $__superDescriptor(proto, name);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 2 days to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6227..6260
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6362..6395
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6614..6647
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 7072..7105

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

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

      var $__superDescriptor = function(proto, name) {
        if (!proto) throw new TypeError('super is null');
        return Object.getPropertyDescriptor(proto, name);
      }, $__superCall = function(self, proto, name, args) {
        var descriptor = $__superDescriptor(proto, name);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 2 days to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6227..6260
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6503..6536
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6614..6647
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 7072..7105

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

      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 (!ch || !isLineTerminator(ch.charCodeAt(0))) {
                          switch (ch) {
                          case 'n':
                              str += '\n';
                              break;
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 2 days to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 1664..1733

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

      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 (!isLineTerminator(ch.charCodeAt(0))) {
                          switch (ch) {
                          case 'n':
                              cooked += '\n';
                              break;
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 2 days to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 1549..1618

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

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

          doImportSpecifiers: function(import_, idx) {
            var dependencyName = import_.source.value;
            var replacement = "";
            {
              var $__1 = traceur.runtime.getIterator(import_.specifiers);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 3 other locations - About 7 hrs to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6335..6353
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6476..6494
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 7163..7181

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

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

          doImportSpecifiers: function(import_, idx) {
            var dependencyName = import_.source.value;
            var replacement = "";
            {
              var $__1 = traceur.runtime.getIterator(import_.specifiers);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 3 other locations - About 7 hrs to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6476..6494
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6738..6756
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 7163..7181

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

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

          doImportSpecifiers: function(import_, idx) {
            var dependencyName = import_.source.value;
            var replacement = "";
            {
              var $__1 = traceur.runtime.getIterator(import_.specifiers);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 3 other locations - About 7 hrs to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6335..6353
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6476..6494
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6738..6756

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

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

          doImportSpecifiers: function(import_, idx) {
            var dependencyName = import_.source.value;
            var replacement = "";
            {
              var $__2 = traceur.runtime.getIterator(import_.specifiers);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 3 other locations - About 7 hrs to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6335..6353
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6738..6756
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 7163..7181

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

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

          function scanPunctuator() {
              var start = index,
                  code = source.charCodeAt(index),
                  code2,
                  ch1 = source[index],
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 6 hrs to fix

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

        var $__getDescriptors = function(object) {
          var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
          for (var i = 0; i < names.length; i++) {
            var name = names[i];
            descriptors[name] = Object.getOwnPropertyDescriptor(object, name);
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 6 hrs to fix
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6096..6109
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6550..6563
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6783..6796
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6952..6965

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

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

        var $__getDescriptors = function(object) {
          var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
          for (var i = 0; i < names.length; i++) {
            var name = names[i];
            descriptors[name] = Object.getOwnPropertyDescriptor(object, name);
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 6 hrs to fix
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6550..6563
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6783..6796
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6894..6907
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6952..6965

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

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

        var $__getDescriptors = function(object) {
          var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
          for (var i = 0; i < names.length; i++) {
            var name = names[i];
            descriptors[name] = Object.getOwnPropertyDescriptor(object, name);
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 6 hrs to fix
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6096..6109
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6550..6563
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6894..6907
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6952..6965

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

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

        var $__getDescriptors = function(object) {
          var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
          for (var i = 0; i < names.length; i++) {
            var name = names[i];
            descriptors[name] = Object.getOwnPropertyDescriptor(object, name);
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 6 hrs to fix
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6096..6109
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6783..6796
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6894..6907
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6952..6965

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

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

        var $__getDescriptors = function(object) {
          var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
          for (var i = 0; i < names.length; i++) {
            var name = names[i];
            descriptors[name] = Object.getOwnPropertyDescriptor(object, name);
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 4 other locations - About 6 hrs to fix
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6096..6109
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6550..6563
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6783..6796
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6894..6907

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

        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 filterTokenLocation() {
                var i, entry, token, tokens = [];
        
                for (i = 0; i < extra.tokens.length; ++i) {
                    entry = extra.tokens[i];
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 6 hrs to fix
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 5327..5346

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

        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