codenautas/self-explain

View on GitHub

Showing 99 of 254 total issues

Function generateNumber has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function generateNumber(value) {
        var result, point, temp, exponent, pos;
        if (value !== value) {
          throw new Error('Numeric literal whose value is NaN');
        }
Severity: Minor
Found in dist/escodegen.browser.js - About 1 hr to fix

    Function TryStatement has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            TryStatement: function (stmt, flags) {
              var result, i, iz, guardedHandlers;
              result = [
                'try',
                this.maybeBlock(stmt.block, S_TFFF)
    Severity: Minor
    Found in dist/escodegen.browser.js - About 1 hr to fix

      Function ObjectExpression has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              ObjectExpression: function (expr, precedence, flags) {
                var multiline, result, fragment, that = this;
                if (!expr.properties.length) {
                  return '{}';
                }
      Severity: Minor
      Found in dist/escodegen.browser.js - About 1 hr to fix

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

              SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
                var previousGeneratedColumn = 0;
                var previousGeneratedLine = 1;
                var previousOriginalColumn = 0;
                var previousOriginalLine = 0;
        Severity: Minor
        Found in dist/escodegen.browser.js - About 1 hr to fix

          Function Program has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  Program: function (stmt, flags) {
                    var result, fragment, i, iz, bodyFlags;
                    iz = stmt.body.length;
                    result = [safeConcatenation && iz > 0 ? '\n' : ''];
                    bodyFlags = S_TFTF;
          Severity: Minor
          Found in dist/escodegen.browser.js - About 1 hr to fix

            Function ExportNamedDeclaration has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    ExportNamedDeclaration: function (stmt, flags) {
                      var result = ['export'], bodyFlags, that = this;
                      bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
                      if (stmt.declaration) {
                        return join(result, this.generateStatement(stmt.declaration, bodyFlags));
            Severity: Minor
            Found in dist/escodegen.browser.js - About 1 hr to fix

              Function ObjectPattern has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      ObjectPattern: function (expr, precedence, flags) {
                        var result, i, iz, multiline, property, that = this;
                        if (!expr.properties.length) {
                          return '{}';
                        }
              Severity: Minor
              Found in dist/escodegen.browser.js - About 1 hr to fix

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

                      function getDefaultOptions() {
                        return {
                          indent: null,
                          base: null,
                          parse: null,
                Severity: Minor
                Found in dist/escodegen.browser.js - About 1 hr to fix

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

                        function generateRegExp(reg) {
                          var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash;
                          result = reg.toString();
                          if (reg.source) {
                            match = result.match(/\/([^\/]*)$/);
                  Severity: Minor
                  Found in dist/escodegen.browser.js - About 1 hr to fix

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

                          function normalize(aPath) {
                            var path = aPath;
                            var url = urlParse(aPath);
                            if (url) {
                              if (!url.path) {
                    Severity: Minor
                    Found in dist/escodegen.browser.js - About 1 hr to fix

                      Function exports has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports = function(config) {
                        config.set({
                      
                          // base path that will be used to resolve all patterns (eg. files, exclude)
                          basePath: '',
                      Severity: Minor
                      Found in karma.conf.js - About 1 hr to fix

                        Function SourceMapGenerator_fromSourceMap has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
                                var sourceRoot = aSourceMapConsumer.sourceRoot;
                                var generator = new SourceMapGenerator({
                                    file: aSourceMapConsumer.file,
                                    sourceRoot: sourceRoot
                        Severity: Minor
                        Found in dist/escodegen.browser.js - About 1 hr to fix

                          Function runFactory has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                function runFactory(id, deps, factory) {
                                  var r, e, m, result;
                                  if (id) {
                                    e = loaderCache[id] = {};
                                    m = {
                          Severity: Minor
                          Found in dist/escodegen.browser.js - About 1 hr to fix

                            Function ArrayExpression has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    ArrayExpression: function (expr, precedence, flags, isPattern) {
                                      var result, multiline, that = this;
                                      if (!expr.elements.length) {
                                        return '[]';
                                      }
                            Severity: Minor
                            Found in dist/escodegen.browser.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                        if (fragment.charCodeAt(0) === 123 || isClassPrefixed(fragment) || isFunctionPrefixed(fragment) || isAsyncPrefixed(fragment) || directive && flags & F_DIRECTIVE_CTX && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string') {
                                          result = [
                                            '(',
                                            result,
                                            ')' + this.semicolon(flags)
                              Severity: Critical
                              Found in dist/escodegen.browser.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
                                          return;
                                        } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
                                          return;
                                        } else {
                                Severity: Critical
                                Found in dist/escodegen.browser.js - About 1 hr to fix

                                  Function ComprehensionExpression has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          ComprehensionExpression: function (expr, precedence, flags) {
                                            var result, i, iz, fragment, that = this;
                                            result = expr.type === Syntax.GeneratorExpression ? ['('] : ['['];
                                            if (extra.moz.comprehensionExpressionStartsWithAssignment) {
                                              fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
                                  Severity: Minor
                                  Found in dist/escodegen.browser.js - About 1 hr to fix

                                    Function escapeString has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          function escapeString(str) {
                                            var result = '', i, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote;
                                            for (i = 0, len = str.length; i < len; ++i) {
                                              code = str.charCodeAt(i);
                                              if (code === 39) {
                                    Severity: Minor
                                    Found in dist/escodegen.browser.js - About 1 hr to fix

                                      Function generateFunctionParams has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            CodeGenerator.prototype.generateFunctionParams = function (node) {
                                              var i, iz, result, hasDefault;
                                              hasDefault = false;
                                              if (node.type === Syntax.ArrowFunctionExpression && !node.rest && (!node.defaults || node.defaults.length === 0) && node.params.length === 1 && node.params[0].type === Syntax.Identifier) {
                                                result = [
                                      Severity: Minor
                                      Found in dist/escodegen.browser.js - About 1 hr to fix

                                        Function SwitchCase has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                SwitchCase: function (stmt, flags) {
                                                  var result, fragment, i, iz, bodyFlags, that = this;
                                                  withIndent(function () {
                                                    if (stmt.test) {
                                                      result = [
                                        Severity: Minor
                                        Found in dist/escodegen.browser.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language