Showing 398 of 398 total issues

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

Primitives.prototype.getPropertyObject = function (object, property) {
  if (immutable[typeof object]) {
    return this.getPrototypeOf(object)
  }
  return object
Severity: Minor
Found in src/notevil/lib/primitives.js and 1 other location - About 40 mins to fix
dist/csp.tmpl.js on lines 63..68

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

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

Consider simplifying this complex logical expression.
Open

                        if (str === '===' || str === '!==' || str === '>>>' ||
                            str === '<<=' || str === '>>=' || str === '**=') {
                            this.index += 3;
                        }
                        else {
Severity: Major
Found in dist/csp.tmpl.js - About 40 mins to fix

    Function MethodDefinition has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            function MethodDefinition(key, computed, value, kind, isStatic) {
    Severity: Minor
    Found in dist/csp.tmpl.js - About 35 mins to fix

      Function Primitives has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      function Primitives (context) {
        if (this instanceof Primitives) {
          this.context = context
          for (var i = 0; i < names.length; i++) {
            if (!this.context[names[i]]) {
      Severity: Minor
      Found in src/notevil/lib/primitives.js - About 35 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

                  for (var _i = 1; _i < arguments.length; _i++) {
                      values[_i - 1] = arguments[_i];
                  }
      Severity: Minor
      Found in dist/csp.tmpl.js and 1 other location - About 35 mins to fix
      dist/csp.tmpl.js on lines 642..644

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

      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

                  return (cp === 0x24) || (cp === 0x5F) ||
                      (cp >= 0x41 && cp <= 0x5A) ||
                      (cp >= 0x61 && cp <= 0x7A) ||
                      (cp >= 0x30 && cp <= 0x39) ||
      Severity: Minor
      Found in dist/csp.tmpl.js and 1 other location - About 35 mins to fix
      dist/csp.tmpl.js on lines 4809..4812

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

      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

                  return (cp === 0x24) || (cp === 0x5F) ||
                      (cp >= 0x41 && cp <= 0x5A) ||
                      (cp >= 0x61 && cp <= 0x7A) ||
                      (cp === 0x5C) ||
      Severity: Minor
      Found in dist/csp.tmpl.js and 1 other location - About 35 mins to fix
      dist/csp.tmpl.js on lines 4816..4819

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

      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

                  for (var _i = 1; _i < arguments.length; _i++) {
                      values[_i - 1] = arguments[_i];
                  }
      Severity: Minor
      Found in dist/csp.tmpl.js and 1 other location - About 35 mins to fix
      dist/csp.tmpl.js on lines 627..629

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

      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

      Avoid too many return statements within this function.
      Open

              return result
      Severity: Major
      Found in dist/csp.tmpl.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                  return finalValue(blockContext[node.name])
        Severity: Major
        Found in dist/csp.tmpl.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return this.scanNumericLiteral();
          Severity: Major
          Found in dist/csp.tmpl.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return obj
            Severity: Major
            Found in dist/csp.tmpl.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return primitives.applyNew(target, args)
              Severity: Major
              Found in dist/csp.tmpl.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return checkValue(obj[prop]);
                Severity: Major
                Found in dist/csp.tmpl.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                            return walk(node.consequent)
                  Severity: Major
                  Found in dist/csp.tmpl.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                        return this.scanIdentifier();
                    Severity: Major
                    Found in dist/csp.tmpl.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return this.scanPunctuator();
                      Severity: Major
                      Found in dist/csp.tmpl.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                            return this.scanNumericLiteral();
                        Severity: Major
                        Found in dist/csp.tmpl.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return result
                          Severity: Major
                          Found in dist/csp.tmpl.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                      return walk(node.alternate)
                            Severity: Major
                            Found in dist/csp.tmpl.js - About 30 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language