pivotal/jasmine

View on GitHub

Showing 328 of 494 total issues

File jasmine.js has 4490 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
Copyright (c) 2008-2018 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Severity: Major
Found in lib/jasmine-core/jasmine.js - About 1 wk to fix

    Function matchersUtil has a Cognitive Complexity of 208 (exceeds 5 allowed). Consider refactoring.
    Open

    getJasmineRequireObj().matchersUtil = function(j$) {
      // TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter?
    
      return {
        equals: equals,
    Severity: Minor
    Found in src/core/matchers/matchersUtil.js - About 4 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 matchersUtil has a Cognitive Complexity of 206 (exceeds 5 allowed). Consider refactoring.
    Open

    getJasmineRequireObj().matchersUtil = function(j$) {
      // TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter?
    
      return {
        equals: equals,
    Severity: Minor
    Found in lib/jasmine-core/jasmine.js - About 4 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 HtmlReporter has a Cognitive Complexity of 177 (exceeds 5 allowed). Consider refactoring.
    Open

    jasmineRequire.HtmlReporter = function(j$) {
    
      var noopTimer = {
        start: function() {},
        elapsed: function() { return 0; }
    Severity: Minor
    Found in src/html/HtmlReporter.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 HtmlReporter has a Cognitive Complexity of 177 (exceeds 5 allowed). Consider refactoring.
    Open

    jasmineRequire.HtmlReporter = function(j$) {
    
      var noopTimer = {
        start: function() {},
        elapsed: function() { return 0; }
    Severity: Minor
    Found in lib/jasmine-core/jasmine-html.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 Env has a Cognitive Complexity of 154 (exceeds 5 allowed). Consider refactoring.
    Open

    getJasmineRequireObj().Env = function(j$) {
      /**
       * _Note:_ Do not construct this directly, Jasmine will make one during booting.
       * @name Env
       * @classdesc The Jasmine environment
    Severity: Minor
    Found in src/core/Env.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 Env has a Cognitive Complexity of 152 (exceeds 5 allowed). Consider refactoring.
    Open

    getJasmineRequireObj().Env = function(j$) {
      /**
       * _Note:_ Do not construct this directly, Jasmine will make one during booting.
       * @name Env
       * @classdesc The Jasmine environment
    Severity: Minor
    Found in lib/jasmine-core/jasmine.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 Env has 586 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    getJasmineRequireObj().Env = function(j$) {
      /**
       * _Note:_ Do not construct this directly, Jasmine will make one during booting.
       * @name Env
       * @classdesc The Jasmine environment
    Severity: Major
    Found in src/core/Env.js - About 2 days to fix

      Function Env has 586 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      getJasmineRequireObj().Env = function(j$) {
        /**
         * _Note:_ Do not construct this directly, Jasmine will make one during booting.
         * @name Env
         * @classdesc The Jasmine environment
      Severity: Major
      Found in lib/jasmine-core/jasmine.js - About 2 days to fix

        Function Env has 583 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function Env(options) {
            options = options || {};
        
            var self = this;
            var global = options.global || j$.getGlobal();
        Severity: Major
        Found in src/core/Env.js - About 2 days to fix

          Function Env has 583 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function Env(options) {
              options = options || {};
          
              var self = this;
              var global = options.global || j$.getGlobal();
          Severity: Major
          Found in lib/jasmine-core/jasmine.js - About 2 days to fix

            Function pp has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
            Open

            getJasmineRequireObj().pp = function(j$) {
            
              function PrettyPrinter() {
                this.ppNestLevel_ = 0;
                this.seen = [];
            Severity: Minor
            Found in src/core/PrettyPrinter.js - About 2 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 pp has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
            Open

            getJasmineRequireObj().pp = function(j$) {
            
              function PrettyPrinter() {
                this.ppNestLevel_ = 0;
                this.seen = [];
            Severity: Minor
            Found in lib/jasmine-core/jasmine.js - About 2 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 HtmlReporter has 417 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            jasmineRequire.HtmlReporter = function(j$) {
            
              var noopTimer = {
                start: function() {},
                elapsed: function() { return 0; }
            Severity: Major
            Found in src/html/HtmlReporter.js - About 2 days to fix

              Function HtmlReporter has 417 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jasmineRequire.HtmlReporter = function(j$) {
              
                var noopTimer = {
                  start: function() {},
                  elapsed: function() { return 0; }
              Severity: Major
              Found in lib/jasmine-core/jasmine-html.js - About 2 days to fix

                Function matchersUtil has 376 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                getJasmineRequireObj().matchersUtil = function(j$) {
                  // TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter?
                
                  return {
                    equals: equals,
                Severity: Major
                Found in src/core/matchers/matchersUtil.js - About 1 day to fix

                  Function HtmlReporter has 376 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function HtmlReporter(options) {
                      var env = options.env || {},
                        getContainer = options.getContainer,
                        createElement = options.createElement,
                        createTextNode = options.createTextNode,
                  Severity: Major
                  Found in src/html/HtmlReporter.js - About 1 day to fix

                    Function matchersUtil has 376 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    getJasmineRequireObj().matchersUtil = function(j$) {
                      // TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter?
                    
                      return {
                        equals: equals,
                    Severity: Major
                    Found in lib/jasmine-core/jasmine.js - About 1 day to fix

                      Function HtmlReporter has 376 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function HtmlReporter(options) {
                          var env = options.env || {},
                            getContainer = options.getContainer,
                            createElement = options.createElement,
                            createTextNode = options.createTextNode,
                      Severity: Major
                      Found in lib/jasmine-core/jasmine-html.js - About 1 day to fix

                        Function TreeProcessor has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
                        Open

                        getJasmineRequireObj().TreeProcessor = function() {
                          function TreeProcessor(attrs) {
                            var tree = attrs.tree,
                                runnableIds = attrs.runnableIds,
                                queueRunnerFactory = attrs.queueRunnerFactory,
                        Severity: Minor
                        Found in src/core/TreeProcessor.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

                        Severity
                        Category
                        Status
                        Source
                        Language