dockyard/es6_module_transpiler-rails

View on GitHub

Showing 225 of 225 total issues

Avoid deeply nested control flow statements.
Open

                    if (ch === '*') {
                        ch = source[index];
                        if (ch === '/') {
                            comment = comment.substr(0, comment.length - 1);
                            blockComment = false;
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

                  if (expr.argument.type === Syntax.ObjectPattern) {
                      throwError({}, Messages.ObjectPatternAsSpread);
                  }
      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

                                  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 (!((operator.value === 'in' || init.kind !== 'var') && init.declarations[0].init)) {
                                        lex();
                                        left = init;
                                        right = parseExpression();
                                        init = null;
            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 === '\r' && source[index + 1] === '\n') {
                                      ++index;
                                      comment += '\r\n';
                                  } else {
                                      comment += ch;
              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

                                    switch (ch) {
                                    case 'n':
                                        cooked += '\n';
                                        break;
                                    case 'r':
                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 (source[index] === '{') {
                                              ++index;
                                              str += scanUnicodeCodePointEscape();
                                          } else {
                                              restore = 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

                                  } else if (isWhiteSpace(ch.charCodeAt(0))) {
                                      ++index;
                                  } else if (isLineTerminator(ch.charCodeAt(0))) {
                                      ++index;
                                      if (ch ===  '\r' && source[index] === '\n') {
                      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 (ch ===  '\r' && source[index] === '\n') {
                                                  ++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 (!checkToken) {
                                                    return scanRegExp();
                                                }
                            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 === 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

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

                                          return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
                                              (ch >= 65 && ch <= 90) ||         // A..Z
                                              (ch >= 97 && ch <= 122) ||        // a..z
                                              (ch === 92) ||                    // \ (backslash)
                                  Severity: Minor
                                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 45 mins to fix
                                  lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 849..852

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

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

                                              if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
                                                  throwErrorTolerant({}, Messages.StrictLHSPostfix);
                                              }
                                  Severity: Major
                                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 2 other locations - About 45 mins to fix
                                  lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 3251..3253
                                  lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4421..4423

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

                                  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

                                          return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
                                              (ch >= 65 && ch <= 90) ||         // A..Z
                                              (ch >= 97 && ch <= 122) ||        // a..z
                                              (ch >= 48 && ch <= 57) ||         // 0..9
                                  Severity: Minor
                                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 45 mins to fix
                                  lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 841..844

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

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

                                              if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
                                                  throwErrorTolerant({}, Messages.StrictLHSPrefix);
                                              }
                                  Severity: Major
                                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 2 other locations - About 45 mins to fix
                                  lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 3223..3225
                                  lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4421..4423

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

                                  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