dockyard/es6_module_transpiler-rails

View on GitHub

Showing 225 of 225 total issues

Function unindent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function unindent(string) {
  var minIndent = null;
  var lines = string.split('\n');
  {
    var $__1 = traceur.runtime.getIterator(lines);
Severity: Minor
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

    Function parseContinueStatement has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function parseContinueStatement() {
            var label = null, key;
    
            expectKeyword('continue');
    
    
    Severity: Minor
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 1 hr to fix

      Function parseModuleDeclaration has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function parseModuleDeclaration() {
              var id, src, body;
      
              lex();   // 'module'
      
      
      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

                    } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
                        options.firstRestricted = param;
                        options.message = Messages.StrictParamDupe;
                    }
        Severity: Minor
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 55 mins to fix
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4628..4631

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

        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 (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
                        options.stricted = param;
                        options.message = Messages.StrictParamDupe;
                    }
        Severity: Minor
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 55 mins to fix
        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4639..4642

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

        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 createFunctionDeclaration has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression) {
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 50 mins to fix

          Function createFunctionExpression has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  createFunctionExpression: function (id, params, defaults, body, rest, generator, expression) {
          Severity: Major
          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 50 mins to fix

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

                function expectKeyword(keyword) {
                    var token = lex();
                    if (token.type !== Token.Keyword || token.value !== keyword) {
                        throwUnexpected(token);
                    }
            Severity: Minor
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 50 mins to fix
            lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 2647..2652

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

            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 expect(value) {
                    var token = lex();
                    if (token.type !== Token.Punctuator || token.value !== value) {
                        throwUnexpected(token);
                    }
            Severity: Minor
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 50 mins to fix
            lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 2657..2662

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

            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

                    case 6:
                        return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
                            (id === 'switch') || (id === 'export') || (id === 'import');
            Severity: Minor
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 50 mins to fix
            lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 911..913

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

            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

                    case 4:
                        return (id === 'this') || (id === 'else') || (id === 'case') ||
                            (id === 'void') || (id === 'with') || (id === 'enum');
            Severity: Minor
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 50 mins to fix
            lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 918..920

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

            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

            Avoid deeply nested control flow statements.
            Open

                                if (ch === 13 && source.charCodeAt(index + 1) === 10) {
                                    ++index;
                                }
            Severity: Major
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if (index >= length) {
                                      throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
                                  }
              Severity: Major
              Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if (isIdentifierStart(ch) || isDecimalDigit(ch)) {
                                            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
                                        }
                Severity: Major
                Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  if (tmp && tmp.type === Syntax.SpreadElement) {
                                      if (!match(']')) {
                                          throwError({}, Messages.ElementAfterSpreadElement);
                                      }
                                  } else if (!(match(']') || matchKeyword('for') || matchKeyword('if'))) {
                  Severity: Major
                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            for (str += '\\u'; restore < index; ++restore) {
                                                str += source[restore];
                                            }
                    Severity: Major
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  if (expr.type !== Syntax.MemberExpression && expr.type !== Syntax.CallExpression && expr.type !== Syntax.NewExpression) {
                                      throwError({}, Messages.InvalidLHSInAssignment);
                                  }
                      Severity: Major
                      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                        if (ch === '/') {
                                            loc = {
                                                start: {
                                                    line: lineNumber,
                                                    column: index - lineStart
                        Severity: Major
                        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if (index >= length) {
                                                  throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
                                              }
                          Severity: Major
                          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                        } else if (isWhiteSpace(ch)) {
                                            ++index;
                                        } else if (isLineTerminator(ch)) {
                                            ++index;
                                            if (ch === 13 && source.charCodeAt(index) === 10) {
                            Severity: Major
                            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language