Showing 398 of 398 total issues

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

function FunctionFactory(parentContext){
  var context = Object.create(parentContext || {});
  return function Function() {
    // normalize arguments array
    var args = Array.prototype.slice.call(arguments);
Severity: Major
Found in dist/csp.tmpl.js and 1 other location - About 6 hrs to fix
src/notevil/index.js on lines 20..34

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

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.getPrototypeOf = function (value) {
  if (value == null) { // handle null and undefined
    return value
  }

Severity: Major
Found in dist/csp.tmpl.js and 1 other location - About 6 hrs to fix
src/notevil/lib/primitives.js on lines 49..74

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

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.getPrototypeOf = function (value) {
  if (value == null) { // handle null and undefined
    return value
  }

Severity: Major
Found in src/notevil/lib/primitives.js and 1 other location - About 6 hrs to fix
dist/csp.tmpl.js on lines 74..99

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

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 tmpl has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var tmpl = (function () {
  //
  // Closure data
  // --------------------------------------------------------------------------
  var _cache = {}
Severity: Major
Found in src/tmpl.js - About 6 hrs to fix

    File index.js has 417 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import InfiniteChecker from './lib/infinite-checker'
    import Primitives from './lib/primitives'
    import { getGlobal } from './helpers'
    import esprima from 'esprima'
    import hoist from 'hoister'
    Severity: Minor
    Found in src/notevil/index.js - About 6 hrs to fix

      Function tmpl has 149 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var tmpl = (function () {
      
        var _cache = {};
      
        function _tmpl (str, data) {
      Severity: Major
      Found in dist/csp.tmpl.js - About 5 hrs to fix

        Function tmpl has 149 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var tmpl = (function () {
        
          var _cache = {}
        
          function _tmpl (str, data) {
        Severity: Major
        Found in dist/es6.tmpl.js - About 5 hrs to fix

          Function tmpl has 148 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var tmpl = (function () {
          
              var _cache = {}
          
              function _tmpl (str, data) {
          Severity: Major
          Found in dist/tmpl.js - About 5 hrs to fix

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

                            if (this.context.strict) {
                                if (this.scanner.isRestrictedWord(token.value)) {
                                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
                                }
                            }
            Severity: Major
            Found in dist/csp.tmpl.js and 1 other location - About 5 hrs to fix
            dist/csp.tmpl.js on lines 2883..2897

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

            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

                            if (this.context.strict) {
                                if (this.scanner.isRestrictedWord(token.value)) {
                                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
                                }
                            }
            Severity: Major
            Found in dist/csp.tmpl.js and 1 other location - About 5 hrs to fix
            dist/csp.tmpl.js on lines 2831..2845

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

            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 parseForStatement has 144 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    Parser.prototype.parseForStatement = function () {
                        var init = null;
                        var test = null;
                        var update = null;
                        var forIn = true;
            Severity: Major
            Found in dist/csp.tmpl.js - About 5 hrs to fix

              Function CommentHandler has 140 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var CommentHandler = (function () {
                      function CommentHandler() {
                          this.attach = false;
                          this.comments = [];
                          this.stack = [];
              Severity: Major
              Found in dist/csp.tmpl.js - About 5 hrs to fix

                File tmpl.js has 396 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                
                /* riot-tmpl v3.0.8, @license MIT, (c) 2015 Muut Inc. + contributors */
                ;(function (window) {     // eslint-disable-line no-extra-semi
                  'use strict'
                
                
                Severity: Minor
                Found in dist/tmpl.js - About 5 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                                              if (str === '&&' || str === '||' || str === '==' || str === '!=' ||
                                                  str === '+=' || str === '-=' || str === '*=' || str === '/=' ||
                                                  str === '++' || str === '--' || str === '<<' || str === '>>' ||
                                                  str === '&=' || str === '|=' || str === '^=' || str === '%=' ||
                                                  str === '<=' || str === '>=' || str === '=>' || str === '**') {
                  Severity: Critical
                  Found in dist/csp.tmpl.js - About 5 hrs to fix

                    File es6.tmpl.js has 382 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    
                    /**
                     * The riot template engine
                     * @version v3.0.8
                     */
                    Severity: Minor
                    Found in dist/es6.tmpl.js - About 5 hrs to fix

                      Function scanTemplate has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              Scanner.prototype.scanTemplate = function () {
                                  var cooked = '';
                                  var terminated = false;
                                  var start = this.index;
                                  var head = (this.source[start] === '`');
                      Severity: Major
                      Found in dist/csp.tmpl.js - About 4 hrs to fix

                        Function skipRegex has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var skipRegex = (function () { //eslint-disable-line no-unused-vars
                        
                          var beforeReChars = '[{(,;:?=|&!^~>%*/'
                        
                          var beforeReWords = [
                        Severity: Minor
                        Found in dist/es6.tmpl.js - About 4 hrs 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

                        Function skipRegex has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var skipRegex = (function () { //eslint-disable-line no-unused-vars
                        
                          // safe characters to precced a regex (including `=>`, `**`, and `...`)
                          var beforeReChars = '[{(,;:?=|&!^~>%*/'
                        
                        
                        Severity: Minor
                        Found in src/skip-regex.js - About 4 hrs 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

                        function wrap (prim) {
                          var proto = Object.create(prim.prototype);
                        
                          var result = function () {
                            if (this instanceof result) {
                        Severity: Major
                        Found in dist/csp.tmpl.js and 1 other location - About 4 hrs to fix
                        src/notevil/lib/primitives.js on lines 97..115

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

                        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

                        function wrap (prim) {
                          var proto = Object.create(prim.prototype)
                        
                          var result = function () {
                            if (this instanceof result) {
                        Severity: Major
                        Found in src/notevil/lib/primitives.js and 1 other location - About 4 hrs to fix
                        dist/csp.tmpl.js on lines 122..140

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

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language