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 _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 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 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 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 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 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 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 _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 _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

                            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 (!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 (ch === '\r' && this.source[this.index] === '\n') {
                                                            ++this.index;
                                                        }
                                Severity: Major
                                Found in dist/csp.tmpl.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          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 (this.scanner.isStrictModeReservedWord(id.name)) {
                                                                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
                                                                }
                                    Severity: Major
                                    Found in dist/csp.tmpl.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                              while (--pos >= 0 && RE_VN_CHAR.test(code[pos]));
                                      Severity: Major
                                      Found in dist/es6.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