dockyard/es6_module_transpiler-rails

View on GitHub

Showing 225 of 225 total issues

Function CJSCompiler has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var CJSCompiler = function($__super) {
  'use strict';
  var $__proto = $__getProtoParent($__super);
  var $CJSCompiler = ($__createClass)({
    constructor: function() {
Severity: Major
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix

    Function AMDCompiler has 91 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var AMDCompiler = function($__super) {
      'use strict';
      var $__proto = $__getProtoParent($__super);
      var $AMDCompiler = ($__createClass)({
        constructor: function() {
    Severity: Major
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix

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

                  if (strict) {
                      if (isRestrictedWord(token.value)) {
                          throwErrorTolerant(token, Messages.StrictFunctionName);
                      }
                  } else {
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 3 hrs to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4741..4753

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

      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 (strict) {
                  if (isRestrictedWord(token.value)) {
                      throwErrorTolerant(token, Messages.StrictFunctionName);
                  }
              } else {
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 3 hrs to fix
      lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4799..4811

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

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

      var Parser = function() {
        'use strict';
        var $Parser = ($__createClassNoExtends)({
          constructor: function(script) {
            this.parse(script);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix

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

            function scanRegExp() {
                var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false;
        
                lookahead = null;
                skipComment();
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix

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

              function scanNumericLiteral() {
                  var number, start, ch, octal;
          
                  ch = source[index];
                  assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),
          Severity: Major
          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix

            Function tokenize has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function tokenize(code, options) {
                    var toString,
                        token,
                        tokens;
            
            
            Severity: Major
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix

              Function parseMethodDefinition has 78 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function parseMethodDefinition(existingPropNames) {
                      var token, key, param, propType, isValidDuplicateProp = false;
              
                      if (lookahead.value === 'static') {
                          propType = ClassPropertyType.static;
              Severity: Major
              Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix

                Function parse has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function parse(code, options) {
                        var program, toString;
                
                        toString = String;
                        if (typeof code !== 'string' && !(code instanceof String)) {
                Severity: Major
                Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix

                  Function YUICompiler has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var YUICompiler = function($__super) {
                    'use strict';
                    var $__proto = $__getProtoParent($__super);
                    var $YUICompiler = ($__createClass)({
                      constructor: function() {
                  Severity: Major
                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

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

                            if (lookahead.type === Token.Identifier) {
                                label = parseVariableIdentifier();
                    
                                key = '$' + label.name;
                                if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
                    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 4195..4202

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

                    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 (lookahead.type === Token.Identifier) {
                                label = parseVariableIdentifier();
                    
                                key = '$' + label.name;
                                if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
                    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 4239..4246

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

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

                        function parseForStatement(opts) {
                            var init, test, update, left, right, body, operator, oldInIteration;
                            init = test = update = null;
                            expectKeyword('for');
                    
                    
                    Severity: Major
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

                      Function parseStatement has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Function skipComment has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function skipComment() {
                                var ch, blockComment, lineComment;
                        
                                blockComment = false;
                                lineComment = false;
                        Severity: Major
                        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

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

                                      if (match('[')) {
                                          expr = delegate.createMemberExpression('[', expr, parseComputedMember());
                                      } else if (match('.')) {
                                          expr = delegate.createMemberExpression('.', expr, parseNonComputedMember());
                                      } else {
                          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 3180..3186

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

                          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

                                      } else if (match('[')) {
                                          expr = delegate.createMemberExpression('[', expr, parseComputedMember());
                                      } else if (match('.')) {
                                          expr = delegate.createMemberExpression('.', expr, parseNonComputedMember());
                                      } else {
                          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 3199..3205

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

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

                              function parseExportDeclaration() {
                                  var previousAllowDefault, decl, def, src, specifiers;
                          
                                  expectKeyword('export');
                          
                          
                          Severity: Major
                          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix

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

                                function wrapTrackingFunction(range, loc) {
                            
                                    return function (parseFunction) {
                            
                                        function isBinary(node) {
                            Severity: Major
                            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language