Showing 398 of 398 total issues

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

InfiniteChecker.prototype.check = function () {
  this.count += 1;
  if (this.count > this.maxIterations) {
    throw new Error('Infinite loop detected - reached max iterations')
  }
Severity: Major
Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
src/notevil/lib/infinite-checker.js on lines 11..16

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                    while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                        number += this.source[this.index++];
                    }
Severity: Major
Found in dist/csp.tmpl.js and 2 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4312..4314
dist/csp.tmpl.js on lines 4319..4321

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                    number += this.source[this.index++];
                }
Severity: Major
Found in dist/csp.tmpl.js and 2 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4319..4321
dist/csp.tmpl.js on lines 4331..4333

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

                while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                    number += this.source[this.index++];
                }
Severity: Major
Found in dist/csp.tmpl.js and 2 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4312..4314
dist/csp.tmpl.js on lines 4331..4333

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

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

                        if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
                            this.tolerateError(messages_1.Messages.InvalidLHSInForIn);
                        }
Severity: Major
Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
dist/csp.tmpl.js on lines 2385..2387

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

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

                        if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
                            this.tolerateError(messages_1.Messages.InvalidLHSInForLoop);
                        }
Severity: Major
Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
dist/csp.tmpl.js on lines 2375..2377

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

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

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

Primitives.prototype.isPrimitive = function (value) {
  return !!~primitives.indexOf(value) || !!~protos.indexOf(value)
};
Severity: Major
Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
src/notevil/lib/primitives.js on lines 45..47

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

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

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

Primitives.prototype.isPrimitive = function (value) {
  return !!~primitives.indexOf(value) || !!~protos.indexOf(value)
}
Severity: Major
Found in src/notevil/lib/primitives.js and 1 other location - About 1 hr to fix
dist/csp.tmpl.js on lines 70..72

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

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

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

                        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
                          Severity
                          Category
                          Status
                          Source
                          Language