Showing 193 of 398 total issues

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

  function _skipRegex (code, start) {

    // `exec()` will extract from the slash to the end of line and the
    // chained `match()` will match the possible regex.
    var re = /.*/g
Severity: Minor
Found in src/skip-regex.js - About 1 hr to fix

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

            Parser.prototype.parseArrayInitializer = function () {
                var node = this.createNode();
                var elements = [];
                this.expect('[');
                while (!this.match(']')) {
    Severity: Minor
    Found in dist/csp.tmpl.js - About 1 hr to fix

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

              Scanner.prototype.scanBinaryLiteral = function (start) {
                  var number = '';
                  var ch;
                  while (!this.eof()) {
                      ch = this.source[this.index];
      Severity: Minor
      Found in dist/csp.tmpl.js - About 1 hr to fix

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

                Scanner.prototype.scanIdentifier = function () {
                    var type;
                    var start = this.index;
                    // Backslash (U+005C) starts an escaped character.
                    var id = (this.source.charCodeAt(start) === 0x5C) ? this.getComplexIdentifier() : this.getIdentifier();
        Severity: Minor
        Found in dist/csp.tmpl.js - About 1 hr to fix

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

            function _wrapExpr (expr, asText, key) {
              var tb
          
              expr = expr.replace(JS_VARNAME, function (match, p, mvar, pos, s) {
                if (mvar) {
          Severity: Minor
          Found in dist/es6.tmpl.js - About 1 hr to fix

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

                    Parser.prototype.parseSwitchStatement = function () {
                        var node = this.createNode();
                        this.expectKeyword('switch');
                        this.expect('(');
                        var discriminant = this.parseExpression();
            Severity: Minor
            Found in dist/csp.tmpl.js - About 1 hr to fix

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

                function _wrapExpr (expr, asText, key) {
                  var tb;
              
                  expr = expr.replace(JS_VARNAME, function (match, p, mvar, pos, s) {
                    if (mvar) {
              Severity: Minor
              Found in dist/csp.tmpl.js - About 1 hr to fix

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

                        Parser.prototype.checkPatternParam = function (options, param) {
                            switch (param.type) {
                                case syntax_1.Syntax.Identifier:
                                    this.validateParam(options, param, param.name);
                                    break;
                Severity: Minor
                Found in dist/csp.tmpl.js - About 1 hr to fix

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

                          Parser.prototype.parseDirectivePrologues = function () {
                              var firstRestricted = null;
                              var body = [];
                              while (true) {
                                  var token = this.lookahead;
                  Severity: Minor
                  Found in dist/csp.tmpl.js - About 1 hr to fix

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

                      function _wrapExpr (expr, asText, key) {
                        var tb
                    
                        expr = expr.replace(JS_VARNAME, function (match, p, mvar, pos, s) {
                          if (mvar) {
                    Severity: Minor
                    Found in src/tmpl.js - About 1 hr to fix

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

                          function _wrapExpr (expr, asText, key) {
                            var tb
                      
                            expr = expr.replace(JS_VARNAME, function (match, p, mvar, pos, s) {
                              if (mvar) {
                      Severity: Minor
                      Found in dist/tmpl.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) {
                                        var value = this.scanner.source[this.scanner.index++];
                                        return {
                                            type: token_1.Token.Punctuator,
                                            value: value,
                        Severity: Major
                        Found in dist/csp.tmpl.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      if (this.match('+') || this.match('-') || this.match('~') || this.match('!') ||
                                          this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) {
                                          var node = this.startNode(this.lookahead);
                                          var token = this.nextToken();
                                          expr = this.inheritCoverGrammar(this.parseUnaryExpression);
                          Severity: Major
                          Found in dist/csp.tmpl.js - About 1 hr to fix

                            Function Property has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    function Property(kind, key, computed, value, method, shorthand) {
                            Severity: Minor
                            Found in dist/csp.tmpl.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
                                                          this.tolerateError(messages_1.Messages.InvalidLHSInForIn);
                                                      }
                              Severity: Major
                              Found in dist/csp.tmpl.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                            if (match[1]) {
                                              if (match[1] === ch) ++ix;
                                              else if (!--ix) break
                                            } else {
                                              rech.lastIndex = pushQBlock(match.index, rech.lastIndex, match[2]);
                                Severity: Major
                                Found in dist/csp.tmpl.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if (arrow) {
                                                                  break;
                                                              }
                                  Severity: Major
                                  Found in dist/csp.tmpl.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if (!arrow) {
                                                                    if (!this.context.isBindingElement) {
                                                                        this.throwUnexpectedToken(this.lookahead);
                                                                    }
                                                                    if (expr.type === syntax_1.Syntax.SequenceExpression) {
                                    Severity: Major
                                    Found in dist/csp.tmpl.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          else if (ch === 0x2A) {
                                                              this.index += 2;
                                                              var comment = this.skipMultiLineComment();
                                                              if (this.trackComment) {
                                                                  comments = comments.concat(comment);
                                      Severity: Major
                                      Found in dist/csp.tmpl.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if (ch === '\r' && this.source[this.index] === '\n') {
                                                                    ++this.index;
                                                                }
                                        Severity: Major
                                        Found in dist/csp.tmpl.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language