dockyard/es6_module_transpiler-rails

View on GitHub

Showing 225 of 225 total issues

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 1286..1295

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

Function 5 has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./abstract_compiler":2,"./source_modifier":10,"./utils":11}],5:[function(require,module,exports){
"use strict";
var $__superDescriptor = function(proto, name) {
  if (!proto) throw new TypeError('super is null');
  return Object.getPropertyDescriptor(proto, name);
Severity: Minor
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

    Function parseAssignmentExpression has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function parseAssignmentExpression() {
            var expr, token, params, oldParenthesizedCount;
    
            if (matchKeyword('yield')) {
                return parseYieldExpression();
    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

              createFunctionExpression: function (id, params, defaults, body, rest, generator, expression) {
                  return {
                      type: Syntax.FunctionExpression,
                      id: id,
                      params: params,
      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 2198..2209

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

      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 (directive === 'use strict') {
                      strict = true;
                      if (firstRestricted) {
                          throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);
                      }
      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 4575..4584

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

      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 + " = __imports__[\"" + 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 6464..6469

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

      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 (directive === 'use strict') {
                      strict = true;
                      if (firstRestricted) {
                          throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);
                      }
      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 5117..5126

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

      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

              createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression) {
                  return {
                      type: Syntax.FunctionDeclaration,
                      id: id,
                      params: params,
      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 2211..2222

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

      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 + " = require(\"" + 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 7151..7156

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

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

          function parseParam(options) {
              var token, rest, param, def;
      
              token = lookahead;
              if (token.value === '...') {
      Severity: Minor
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

        Function advance has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function advance() {
                var ch;
        
                skipComment();
        
        
        Severity: Minor
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

          Function parseExpression has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function parseExpression() {
                  var expr, expressions, sequence, coverFormalsList, spreadFound, oldParenthesizedCount;
          
                  oldParenthesizedCount = state.parenthesizedCount;
          
          
          Severity: Minor
          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

            Function SourceModifier has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var SourceModifier = function() {
              'use strict';
              var $SourceModifier = ($__createClassNoExtends)({
                constructor: function(source) {
                  this.source = source;
            Severity: Minor
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

              Function parseObjectInitialiser has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function parseObjectInitialiser() {
                      var properties = [], property, name, key, kind, map = {}, toString = String;
              
                      expect('{');
              
              
              Severity: Minor
              Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

                Function Compiler has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var Compiler = function() {
                  'use strict';
                  var $Compiler = ($__createClassNoExtends)({
                    constructor: function(string, moduleName, options) {
                      if (moduleName == null) {
                Severity: Minor
                Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

                  Function polyfillString has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function polyfillString(String) {
                      // Harmony String Extras
                      // http://wiki.ecmascript.org/doku.php?id=harmony:string_extras
                      Object.defineProperties(String.prototype, {
                        startsWith: method(function(s) {
                  Severity: Minor
                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

                    Function getEscapedIdentifier has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function getEscapedIdentifier() {
                            var ch, id;
                    
                            ch = source.charCodeAt(index++);
                            id = String.fromCharCode(ch);
                    Severity: Minor
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

                      Function visit has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  function visit(node) {
                                      var start, end;
                      
                                      if (isBinary(node.left)) {
                                          visit(node.left);
                      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

                            function parseExportSpecifier() {
                                var id, name = null;
                        
                                id = parseVariableIdentifier();
                                if (matchContextualKeyword('as')) {
                        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 3969..3979

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

                        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 parseImportSpecifier() {
                                var id, name = null;
                        
                                id = parseNonComputedProperty();
                                if (matchContextualKeyword('as')) {
                        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 3846..3856

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

                        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