codenautas/self-explain

View on GitHub

Showing 99 of 254 total issues

Function IndexedSourceMapConsumer has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function IndexedSourceMapConsumer(aSourceMap) {
        var sourceMap = aSourceMap;
        if (typeof aSourceMap === 'string') {
          sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
        }
Severity: Minor
Found in dist/escodegen.browser.js - About 1 hr to fix

    Function BinaryExpression has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            BinaryExpression: function (expr, precedence, flags) {
              var result, currentPrecedence, fragment, leftSource;
              currentPrecedence = BinaryPrecedence[expr.operator];
              if (currentPrecedence < precedence) {
                flags |= F_ALLOW_IN;
    Severity: Minor
    Found in dist/escodegen.browser.js - About 1 hr to fix

      Function adjustMultilineComment has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function adjustMultilineComment(value, specialBase) {
              var array, i, len, line, j, spaces, previousBase, sn;
              array = value.split(/\r\n|[\r\n]/);
              spaces = Number.MAX_VALUE;
              for (i = 1, len = array.length; i < len; ++i) {
      Severity: Minor
      Found in dist/escodegen.browser.js - About 1 hr to fix

        Function ForStatement has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                ForStatement: function (stmt, flags) {
                  var result, that = this;
                  withIndent(function () {
                    result = ['for' + space + '('];
                    if (stmt.init) {
        Severity: Minor
        Found in dist/escodegen.browser.js - About 1 hr to fix

          Function join has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                function join(aRoot, aPath) {
                  if (aRoot === '') {
                    aRoot = '.';
                  }
                  if (aPath === '') {
          Severity: Minor
          Found in dist/escodegen.browser.js - About 1 hr to fix

            Function IndexedSourceMapConsumer_parseMappings has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
                    this.__generatedMappings = [];
                    this.__originalMappings = [];
                    for (var i = 0; i < this._sections.length; i++) {
                      var section = this._sections[i];
            Severity: Minor
            Found in dist/escodegen.browser.js - About 1 hr to fix

              Function VariableDeclaration has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      VariableDeclaration: function (stmt, flags) {
                        var result, i, iz, node, bodyFlags, that = this;
                        result = [stmt.kind];
                        bodyFlags = flags & F_ALLOW_IN ? S_TFFF : S_FFFF;
                        function block() {
              Severity: Minor
              Found in dist/escodegen.browser.js - About 1 hr to fix

                Function join has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function join(left, right) {
                        var leftSource, rightSource, leftCharCode, rightCharCode;
                        leftSource = toSourceNodeWhenNeeded(left).toString();
                        if (leftSource.length === 0) {
                          return [right];
                Severity: Minor
                Found in dist/escodegen.browser.js - About 1 hr to fix

                  Function SourceMapConsumer_eachMapping has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
                          var context = aContext || null;
                          var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
                          var mappings;
                          switch (order) {
                  Severity: Minor
                  Found in dist/escodegen.browser.js - About 1 hr to fix

                    Function IfStatement has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            IfStatement: function (stmt, flags) {
                              var result, bodyFlags, semicolonOptional, that = this;
                              withIndent(function () {
                                result = [
                                  'if' + space + '(',
                    Severity: Minor
                    Found in dist/escodegen.browser.js - About 1 hr to fix

                      Function define has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            function define(id, deps, factory) {
                              if (Array.isArray(id)) {
                                factory = deps;
                                deps = id;
                                id = undefined;
                      Severity: Minor
                      Found in dist/escodegen.browser.js - About 1 hr to fix

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

                              BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
                                var needle = {
                                    generatedLine: util.getArg(aArgs, 'line'),
                                    generatedColumn: util.getArg(aArgs, 'column')
                                  };
                        Severity: Minor
                        Found in dist/escodegen.browser.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if ((leftCharCode === 43 || leftCharCode === 45) && leftCharCode === rightCharCode || esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) || leftCharCode === 47 && rightCharCode === 105) {
                                    return [
                                      left,
                                      noEmptySpace(),
                                      right
                          Severity: Major
                          Found in dist/escodegen.browser.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                      } else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 32 || !json && !escapeless && (code < 32 || code > 126))) {
                                        result += escapeAllowedCharacter(code, str.charCodeAt(i + 1));
                                        continue;
                                      }
                            Severity: Major
                            Found in dist/escodegen.browser.js - About 1 hr to fix

                              Avoid deeply nested control flow statements.
                              Open

                                              if (ch === 47) {
                                                result += '\\';
                                              } else if (ch === 91) {
                                                characterInBrack = true;
                                              }
                              Severity: Major
                              Found in dist/escodegen.browser.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                while ((current2 -= 1) >= 0) {
                                                  if (!candidate[current2]) {
                                                    continue;
                                                  }
                                                  if (isProperty(nodeType, candidates[current])) {
                                Severity: Major
                                Found in dist/escodegen.browser.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                  if (!candidate[current2]) {
                                                    continue;
                                                  }
                                  Severity: Major
                                  Found in dist/escodegen.browser.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                    if (isProperty(nodeType, candidates[current])) {
                                                      element = new Element(candidate[current2], [
                                                        key,
                                                        current2
                                                      ], 'Property', new Reference(candidate, current2));
                                    Severity: Major
                                    Found in dist/escodegen.browser.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                    } else if (isNode(candidate)) {
                                                      worklist.push(new Element(candidate, key, null, null));
                                                    }
                                      Severity: Major
                                      Found in dist/escodegen.browser.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                          if (stmt.finalizer || i + 1 !== iz) {
                                                            result = this.maybeBlockSuffix(stmt.handler[i].body, result);
                                                          }
                                        Severity: Major
                                        Found in dist/escodegen.browser.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language