broadsw0rd/enhanced-log

View on GitHub

Showing 50 of 86 total issues

File mocha.js has 3373 lines of code (exceeds 250 allowed). Consider refactoring.
Open

;(function(){

// CommonJS require()

function require(p){
Severity: Major
Found in libs/mocha.js - About 1 wk to fix

    Function factory has 296 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    }('log', this, function factory(){
    
    return function scope(global, Object, Array, prototype, __proto__){
    
        // =====================================
    Severity: Major
    Found in src/log.js - About 1 day to fix

      Function scope has 294 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      return function scope(global, Object, Array, prototype, __proto__){
      
          // =====================================
          // Private interface
          // =====================================
      Severity: Major
      Found in src/log.js - About 1 day to fix

        Function JsDiff has 290 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var JsDiff = (function() {
          /*jshint maxparams: 5*/
          function clonePath(path) {
            return { newPos: path.newPos, components: path.components.slice(0) };
          }
        Severity: Major
        Found in libs/mocha.js - About 1 day to fix

          Function factory has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
          Open

          }('log', this, function factory(){
          
          return function scope(global, Object, Array, prototype, __proto__){
          
              // =====================================
          Severity: Minor
          Found in src/log.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 HTML has 95 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function HTML(runner) {
            Base.call(this, runner);
          
            var self = this
              , stats = this.stats
          Severity: Major
          Found in libs/mocha.js - About 3 hrs to fix

            File log.js has 308 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
                ______      __                              __   __               
               / ____/___  / /_  ____ _____  ________  ____/ /  / /   ____  ____ _
              / __/ / __ \/ __ \/ __ `/ __ \/ ___/ _ \/ __  /  / /   / __ \/ __ `/
             / /___/ / / / / / / /_/ / / / / /__/  __/ /_/ /  / /___/ /_/ / /_/ / 
            Severity: Minor
            Found in src/log.js - About 3 hrs to fix

              Function createPatch has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) {
                    var ret = [];
              
                    ret.push('Index: ' + fileName);
                    ret.push('===================================================================');
              Severity: Major
              Found in libs/mocha.js - About 2 hrs to fix

                Function run has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Runnable.prototype.run = function(fn){
                  var self = this
                    , start = new Date
                    , ctx = this.ctx
                    , finished
                Severity: Major
                Found in libs/mocha.js - About 2 hrs to fix

                  Function Markdown has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Markdown(runner) {
                    Base.call(this, runner);
                  
                    var self = this
                      , stats = this.stats
                  Severity: Major
                  Found in libs/mocha.js - About 2 hrs to fix

                    Function exports has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function(suite){
                      var suites = [suite];
                    
                      suite.on('pre-require', function(context, file, mocha){
                    
                    
                    Severity: Major
                    Found in libs/mocha.js - About 2 hrs to fix

                      Function canonicalize has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      exports.canonicalize = function(value, stack) {
                        var canonicalizedObj,
                          type = exports.type(value),
                          prop,
                          withStack = function withStack(value, fn) {
                      Severity: Major
                      Found in libs/mocha.js - About 2 hrs to fix

                        Function runTests has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Runner.prototype.runTests = function(suite, fn){
                          var self = this
                            , tests = suite.tests.slice()
                            , test;
                        
                        
                        Severity: Major
                        Found in libs/mocha.js - About 2 hrs to fix

                          Function exports has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports = function(suite){
                            var suites = [suite];
                          
                            suite.on('pre-require', function(context, file, mocha){
                          
                          
                          Severity: Minor
                          Found in libs/mocha.js - About 2 hrs to fix

                            Function diff has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  diff: function(oldString, newString) {
                                    // Handle the identity case (this is due to unrolling editLength == 0
                                    if (newString === oldString) {
                                      return [{ value: newString }];
                                    }
                            Severity: Minor
                            Found in libs/mocha.js - About 1 hr to fix

                              Function applyPatch has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  applyPatch: function(oldStr, uniDiff) {
                                    var diffstr = uniDiff.split('\n');
                                    var diff = [];
                                    var remEOFNL = false,
                                        addEOFNL = false;
                              Severity: Minor
                              Found in libs/mocha.js - About 1 hr to fix

                                Function Spec has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function Spec(runner) {
                                  Base.call(this, runner);
                                
                                  var self = this
                                    , stats = this.stats
                                Severity: Minor
                                Found in libs/mocha.js - About 1 hr to fix

                                  Function Progress has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function Progress(runner, options) {
                                    Base.call(this, runner);
                                  
                                    var self = this
                                      , options = options || {}
                                  Severity: Minor
                                  Found in libs/mocha.js - About 1 hr to fix

                                    Function exports has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    module.exports = function(suite){
                                      var suites = [suite];
                                    
                                      suite.on('pre-require', function(context, file, mocha){
                                    
                                    
                                    Severity: Minor
                                    Found in libs/mocha.js - About 1 hr to fix

                                      Function Base has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function Base(runner) {
                                        var self = this
                                          , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 }
                                          , failures = this.failures = [];
                                      
                                      
                                      Severity: Minor
                                      Found in libs/mocha.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language