dockyard/es6_module_transpiler-rails

View on GitHub

Showing 225 of 225 total issues

Function 6 has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],6:[function(require,module,exports){
"use strict";
var $__getDescriptors = function(object) {
  var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
  for (var i = 0; i < names.length; i++) {
Severity: Major
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

    Function parseArrayInitialiser has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function parseArrayInitialiser() {
            var elements = [], blocks = [], filter = null, tmp, possiblecomprehension = true, body;
    
            expect('[');
            while (!match(']')) {
    Severity: Major
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

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

          doDefaultImport: function(name, dependencyName, idx) {
            if (this.options.compatFix === true) {
              return ("var " + name + " = require(\"" + dependencyName + "\")[\"default\"] || require(\"" + dependencyName + "\");\n");
            } else {
              return ("var " + name + " = require(\"" + dependencyName + "\")[\"default\"];\n");
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 2 hrs to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 7140..7146

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

      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

          doDefaultImport: function(name, dependencyName, idx) {
            if (this.options.compatFix === true) {
              return ("var " + name + " = __imports__[\"" + dependencyName + "\"][\"default\"] || __imports__[\"" + dependencyName + "\"];\n");
            } else {
              return ("var " + name + " = __imports__[\"" + dependencyName + "\"][\"default\"];\n");
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 2 hrs to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6454..6460

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

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

          function parsePrimaryExpression() {
              var type, token;
      
              token = lookahead;
              type = lookahead.type;
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

        Function binaryPrecedence has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function binaryPrecedence(token, allowIn) {
                var prec = 0;
        
                if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {
                    return 0;
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

          Function 10 has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{"esprima":1}],10:[function(require,module,exports){
          "use strict";
          var $__getDescriptors = function(object) {
            var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
            for (var i = 0; i < names.length; i++) {
          Severity: Major
          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

            Function buildExports has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                buildExports: function() {
                  var source = this.source, exports_ = this.exports;
                  {
                    var $__2 = traceur.runtime.getIterator(exports_);
                    try {
            Severity: Major
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

              Function parseFunctionSourceElements has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function parseFunctionSourceElements() {
                      var sourceElement, sourceElements = [], token, directive, firstRestricted,
                          oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesizedCount;
              
                      expect('{');
              Severity: Major
              Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

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

                    function parseStatementList() {
                        var list = [],
                            statement;
                
                        while (index < length) {
                Severity: Major
                Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 2 hrs to fix
                lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 5143..5159

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

                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 parseModuleElements() {
                        var list = [],
                            statement;
                
                        while (index < length) {
                Severity: Major
                Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 2 hrs to fix
                lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 3685..3701

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

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

                    function unpatch() {
                        if (typeof extra.skipComment === 'function') {
                            skipComment = extra.skipComment;
                        }
                
                
                Severity: Major
                Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

                  Function reinterpretAsCoverFormalsList has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function reinterpretAsCoverFormalsList(expressions) {
                          var i, len, param, params, defaults, defaultCount, options, rest;
                  
                          params = [];
                          defaults = [];
                  Severity: Minor
                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

                    Function parseFunctionDeclaration has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function parseFunctionDeclaration() {
                            var id, body, token, tmp, firstRestricted, message, previousStrict, previousYieldAllowed, generator, expression;
                    
                            expectKeyword('function');
                    
                    
                    Severity: Minor
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

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

                          doExportSpecifier: function(name, reexport) {
                            if (reexport) {
                              return ("__exports__." + name + " = __dependency" + this.map[reexport] + "__." + name + ";\n");
                            }
                            return ("__exports__." + name + " = " + name + ";\n");
                      Severity: Major
                      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 1 hr to fix
                      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6723..6728

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

                      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

                          doExportSpecifier: function(name, reexport) {
                            if (reexport) {
                              return ("__exports__." + name + " = __dependency" + this.map[reexport] + "__." + name + ";\n");
                            }
                            return ("__exports__." + name + " = " + name + ";\n");
                      Severity: Major
                      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 1 hr to fix
                      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6323..6328

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

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

                          function parseObjectProperty() {
                              var token, key, id, value, param;
                      
                              token = lookahead;
                      
                      
                      Severity: Minor
                      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

                        Function advanceSlash has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function advanceSlash() {
                                var prevToken,
                                    checkToken;
                                // Using the following algorithm:
                                // https://github.com/mozilla/sweet.js/wiki/design
                        Severity: Minor
                        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

                          Function parseFunctionExpression has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function parseFunctionExpression() {
                                  var token, id = null, firstRestricted, message, tmp, body, previousStrict, previousYieldAllowed, generator, expression;
                          
                                  expectKeyword('function');
                          
                          
                          Severity: Minor
                          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

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

                                    if (ch1 === '>' && ch2 === '>' && ch3 === '=') {
                                        index += 3;
                                        return {
                                            type: Token.Punctuator,
                                            value: '>>=',
                            Severity: Major
                            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 1 hr to fix
                            lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 1275..1284

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

                            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