Showing 193 of 398 total issues

Function esprima has 5947 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var esprima = createCommonjsModule(function (module, exports) {
(function webpackUniversalModuleDefinition(root, factory) {
/* istanbul ignore next */
    module.exports = factory();
})(commonjsGlobal, function() {
Severity: Major
Found in dist/csp.tmpl.js - About 1 mo to fix

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

    (function (global, factory) {
        typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
        typeof define === 'function' && define.amd ? define(['exports'], factory) :
        (factory((global.cspTmpl = global.cspTmpl || {})));
    }(this, (function (exports) { 'use strict';
    Severity: Major
    Found in dist/csp.tmpl.js - About 2 wks to fix

      Function Parser has 2764 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var Parser = (function () {
              function Parser(code, options, delegate) {
                  if (options === void 0) { options = {}; }
                  this.config = {
                      range: (typeof options.range === 'boolean') && options.range,
      Severity: Major
      Found in dist/csp.tmpl.js - About 1 wk to fix

        Function Scanner has 1052 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var Scanner = (function () {
                function Scanner(code, handler) {
                    this.source = code;
                    this.errorHandler = handler;
                    this.trackComment = false;
        Severity: Major
        Found in dist/csp.tmpl.js - About 5 days to fix

          Function evaluateAst has a Cognitive Complexity of 155 (exceeds 5 allowed). Consider refactoring.
          Open

          function evaluateAst(tree, context){
          
            var safeFunction = FunctionFactory(context)
            var primitives = Primitives(context)
          
          
          Severity: Minor
          Found in src/notevil/index.js - About 3 days 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 JSXParser has 470 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var JSXParser = (function (_super) {
                  __extends(JSXParser, _super);
                  function JSXParser(code, options, delegate) {
                      _super.call(this, code, options, delegate);
                  }
          Severity: Major
          Found in dist/csp.tmpl.js - About 2 days to fix

            Function brackets has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
            Open

            var brackets = (function (UNDEF) {
              //
              // Closure data
              // --------------------------------------------------------------------------
              //
            Severity: Minor
            Found in src/brackets.js - About 1 day 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 brackets has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring.
            Open

            var brackets = (function (UNDEF) {
            
              var
                REGLOB = 'g',
            
            
            Severity: Minor
            Found in dist/es6.tmpl.js - About 1 day 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 tmpl has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
            Open

            var tmpl = (function () {
              //
              // Closure data
              // --------------------------------------------------------------------------
              var _cache = {}
            Severity: Minor
            Found in src/tmpl.js - About 1 day 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 evaluateAst has 299 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function evaluateAst(tree, context){
            
              var safeFunction = FunctionFactory(context);
              var primitives = Primitives(context);
            
            
            Severity: Major
            Found in dist/csp.tmpl.js - About 1 day to fix

              Function evaluateAst has 299 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function evaluateAst(tree, context){
              
                var safeFunction = FunctionFactory(context)
                var primitives = Primitives(context)
              
              
              Severity: Major
              Found in src/notevil/index.js - About 1 day to fix

                Function tmpl has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
                Open

                var tmpl = (function () {
                
                  var _cache = {}
                
                  function _tmpl (str, data) {
                Severity: Minor
                Found in dist/es6.tmpl.js - About 1 day 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 walk has 245 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function walk(node){
                    if (!node) return
                
                    switch (node.type) {
                
                
                Severity: Major
                Found in dist/csp.tmpl.js - About 1 day to fix

                  Function walk has 245 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function walk(node){
                      if (!node) return
                  
                      switch (node.type) {
                  
                  
                  Severity: Major
                  Found in src/notevil/index.js - About 1 day to fix

                    Function brackets has 180 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var brackets = (function (UNDEF) {
                      //
                      // Closure data
                      // --------------------------------------------------------------------------
                      //
                    Severity: Major
                    Found in src/brackets.js - About 7 hrs to fix

                      Function brackets has 173 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var brackets = (function (UNDEF) {
                      
                          var
                            REGLOB = 'g',
                      
                      
                      Severity: Major
                      Found in dist/tmpl.js - About 6 hrs to fix

                        Function brackets has 173 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var brackets = (function (UNDEF) {
                        
                          var
                            REGLOB = 'g',
                        
                        
                        Severity: Major
                        Found in dist/es6.tmpl.js - About 6 hrs to fix

                          Function brackets has 173 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var brackets = (function (UNDEF) {
                          
                            var
                              REGLOB = 'g',
                          
                          
                          Severity: Major
                          Found in dist/csp.tmpl.js - About 6 hrs to fix

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