broadsw0rd/enhanced-log

View on GitHub

Showing 86 of 86 total issues

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

    context.test.only = function(title, fn){
      var test = context.test(title, fn);
      var reString = '^' + escapeRe(test.fullTitle()) + '$';
      mocha.grep(new RegExp(reString));
    };
Severity: Major
Found in libs/mocha.js and 1 other location - About 2 hrs to fix
libs/mocha.js on lines 1253..1257

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

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

    context.suite.skip = function(title, fn) {
      var suite = Suite.create(suites[0], title);
      suite.pending = true;
      suites.unshift(suite);
      fn.call(suite);
Severity: Major
Found in libs/mocha.js and 1 other location - About 2 hrs to fix
libs/mocha.js on lines 1012..1018

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

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

    context.describe = context.context = function(title, fn){
      var suite = Suite.create(suites[0], title);
      suite.file = file;
      suites.unshift(suite);
      fn.call(suite);
Severity: Major
Found in libs/mocha.js and 1 other location - About 2 hrs to fix
libs/mocha.js on lines 1349..1356

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

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

    context.suite = function(title, fn){
      var suite = Suite.create(suites[0], title);
      suite.file = file;
      suites.unshift(suite);
      fn.call(suite);
Severity: Major
Found in libs/mocha.js and 1 other location - About 2 hrs to fix
libs/mocha.js on lines 997..1004

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

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

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

          context.test = function(title, fn){
            var suite = suites[0];
            if (suite.pending) fn = null;
            var test = new Test(title, fn);
            test.file = file;
      Severity: Major
      Found in libs/mocha.js and 1 other location - About 2 hrs to fix
      libs/mocha.js on lines 1036..1043

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

      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

          context.it = context.specify = function(title, fn){
            var suite = suites[0];
            if (suite.pending) fn = null;
            var test = new Test(title, fn);
            test.file = file;
      Severity: Major
      Found in libs/mocha.js and 1 other location - About 2 hrs to fix
      libs/mocha.js on lines 1384..1391

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

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

                      Function Landing has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

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

                        Suite.prototype.enableTimeouts = function(enabled){
                          if (arguments.length === 0) return this._enableTimeouts;
                          debug('enableTimeouts %s', enabled);
                          this._enableTimeouts = enabled;
                          return this;
                        Severity: Major
                        Found in libs/mocha.js and 1 other location - About 1 hr to fix
                        libs/mocha.js on lines 4345..4350

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

                        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

                        Runnable.prototype.enableTimeouts = function(enabled){
                          if (arguments.length === 0) return this._enableTimeouts;
                          debug('enableTimeouts %s', enabled);
                          this._enableTimeouts = enabled;
                          return this;
                        Severity: Major
                        Found in libs/mocha.js and 1 other location - About 1 hr to fix
                        libs/mocha.js on lines 5316..5321

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

                        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

                                ,   topSpace = Array.apply(null, { length : padding.top }).map(function(){
                                            return symbol + leftPadding + emptyRow + rightPadding + symbol
                                        }).join('\n\t')
                        Severity: Major
                        Found in src/log.js and 1 other location - About 1 hr to fix
                        src/log.js on lines 204..206

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

                        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