jquery/jquery

View on GitHub
external/qunit/qunit.js

Summary

Maintainability
F
3 wks
Test Coverage

File qunit.js has 3042 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * QUnit 1.23.1
 * https://qunitjs.com/
 *
 * Copyright jQuery Foundation and other contributors
Severity: Major
Found in external/qunit/qunit.js - About 1 wk to fix

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

    QUnit.diff = ( function() {
        function DiffMatchPatch() {
        }
    
        //  DIFF FUNCTIONS
    Severity: Major
    Found in external/qunit/qunit.js - About 3 days to fix

      Function dump has 210 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      QUnit.dump = ( function() {
          function quote( str ) {
              return "\"" + str.toString().replace( /\\/g, "\\\\" ).replace( /"/g, "\\\"" ) + "\"";
          }
          function literal( o ) {
      Severity: Major
      Found in external/qunit/qunit.js - About 1 day to fix

        Function equiv has 178 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        QUnit.equiv = ( function() {
        
            // Stack to decide between skip/abort functions
            var callers = [];
        
        
        Severity: Major
        Found in external/qunit/qunit.js - About 7 hrs to fix

          Function diffCleanupMerge has 113 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              DiffMatchPatch.prototype.diffCleanupMerge = function( diffs ) {
                  var pointer, countDelete, countInsert, textInsert, textDelete,
                      commonlength, changes, diffPointer, position;
                  diffs.push( [ DIFF_EQUAL, "" ] ); // Add a dummy entry at the end.
                  pointer = 0;
          Severity: Major
          Found in external/qunit/qunit.js - About 4 hrs to fix

            Function diffCleanupSemantic has 94 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                DiffMatchPatch.prototype.diffCleanupSemantic = function( diffs ) {
                    var changes, equalities, equalitiesLength, lastequality,
                        pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1,
                        lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;
                    changes = false;
            Severity: Major
            Found in external/qunit/qunit.js - About 3 hrs to fix

              Function diffBisect has 90 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  DiffMatchPatch.prototype.diffBisect = function( text1, text2, deadline ) {
                      var text1Length, text2Length, maxD, vOffset, vLength,
                          v1, v2, x, delta, front, k1start, k1end, k2start,
                          k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2;
              
              
              Severity: Major
              Found in external/qunit/qunit.js - About 3 hrs to fix

                Function diffHalfMatch has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    DiffMatchPatch.prototype.diffHalfMatch = function( text1, text2 ) {
                        var longtext, shorttext, dmp,
                            text1A, text2B, text2A, text1B, midCommon,
                            hm1, hm2, hm;
                
                
                Severity: Major
                Found in external/qunit/qunit.js - About 2 hrs to fix

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

                      DiffMatchPatch.prototype.diffCleanupEfficiency = function( diffs ) {
                          var changes, equalities, equalitiesLength, lastequality,
                              pointer, preIns, preDel, postIns, postDel;
                          changes = false;
                          equalities = []; // Stack of indices where equalities are found.
                  Severity: Major
                  Found in external/qunit/qunit.js - About 2 hrs to fix

                    Function module has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        module: function( name, testEnvironment, executeNow ) {
                            var module, moduleFns;
                            var currentModule = config.currentModule;
                    
                            if ( arguments.length === 2 ) {
                    Severity: Major
                    Found in external/qunit/qunit.js - About 2 hrs to fix

                      Function getUrlConfigHtml has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function getUrlConfigHtml() {
                          var i, j, val,
                              escaped, escapedTooltip,
                              selection = false,
                              urlConfig = config.urlConfig,
                      Severity: Major
                      Found in external/qunit/qunit.js - About 2 hrs to fix

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

                            DiffMatchPatch.prototype.diffCompute = function( text1, text2, checklines, deadline ) {
                                var diffs, longtext, shorttext, i, hm,
                                    text1A, text2A, text1B, text2B,
                                    midCommon, diffsA, diffsB;
                        
                        
                        Severity: Minor
                        Found in external/qunit/qunit.js - About 2 hrs to fix

                          Function diffLineMode has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              DiffMatchPatch.prototype.diffLineMode = function( text1, text2, deadline ) {
                                  var a, diffs, linearray, pointer, countInsert,
                                      countDelete, textInsert, textDelete, j;
                          
                                  // Scan the text on a line-by-line basis first.
                          Severity: Minor
                          Found in external/qunit/qunit.js - About 1 hr to fix

                            Function throws has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                "throws": function( block, expected, message ) {
                                    var actual, expectedType,
                                        expectedOutput = expected,
                                        ok = false,
                                        currentTest = ( this instanceof Assert && this.test ) || QUnit.config.current;
                            Severity: Minor
                            Found in external/qunit/qunit.js - About 1 hr to fix

                              Function finish has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  finish: function() {
                                      config.current = this;
                                      if ( config.requireExpects && this.expected === null ) {
                                          this.pushFailure( "Expected number of assertions to be defined, but expect() was " +
                                              "not called.", this.stack );
                              Severity: Minor
                              Found in external/qunit/qunit.js - About 1 hr to fix

                                Function valid has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    valid: function() {
                                        var filter = config.filter,
                                            regexFilter = /^(!?)\/([\w\W]*)\/(i?$)/.exec( filter ),
                                            module = config.module && config.module.toLowerCase(),
                                            fullName = ( this.module.name + ": " + this.testName );
                                Severity: Minor
                                Found in external/qunit/qunit.js - About 1 hr to fix

                                  Function start has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      start: function( count ) {
                                          var globalStartAlreadyCalled = globalStartCalled;
                                  
                                          if ( !config.current ) {
                                              globalStartCalled = true;
                                  Severity: Minor
                                  Found in external/qunit/qunit.js - About 1 hr to fix

                                    Function object has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            "object": function( b, a ) {
                                                var i, j, loop, aCircular, bCircular;
                                    
                                                // Default to true
                                                var eq = true;
                                    Severity: Minor
                                    Found in external/qunit/qunit.js - About 1 hr to fix

                                      Function before has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          before: function() {
                                              if (
                                      
                                                  // Emit moduleStart when we're switching from one module to another
                                                  this.module !== config.previousModule ||
                                      Severity: Minor
                                      Found in external/qunit/qunit.js - About 1 hr to fix

                                        Function diffLinesToChars has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            DiffMatchPatch.prototype.diffLinesToChars = function( text1, text2 ) {
                                                var lineArray, lineHash, chars1, chars2;
                                                lineArray = []; // E.g. lineArray[4] === 'Hello\n'
                                                lineHash = {};  // E.g. lineHash['Hello\n'] === 4
                                        
                                        
                                        Severity: Minor
                                        Found in external/qunit/qunit.js - About 1 hr to fix

                                          Function DiffMain has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              DiffMatchPatch.prototype.DiffMain = function( text1, text2, optChecklines ) {
                                                  var deadline, checklines, commonlength,
                                                      commonprefix, commonsuffix, diffs;
                                          
                                                  // The diff must be complete in up to 1 second.
                                          Severity: Minor
                                          Found in external/qunit/qunit.js - About 1 hr to fix

                                            Function typeOf has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                        typeOf: function( obj ) {
                                                            var type;
                                                            if ( obj === null ) {
                                                                type = "null";
                                                            } else if ( typeof obj === "undefined" ) {
                                            Severity: Minor
                                            Found in external/qunit/qunit.js - About 1 hr to fix

                                              Function diffCommonOverlap has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  DiffMatchPatch.prototype.diffCommonOverlap = function( text1, text2 ) {
                                                      var text1Length, text2Length, textLength,
                                                          best, length, pattern, found;
                                              
                                                      // Cache the text lengths to prevent multiple calls.
                                              Severity: Minor
                                              Found in external/qunit/qunit.js - About 1 hr to fix

                                                Function array has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                        "array": function( b, a ) {
                                                            var i, j, len, loop, aCircular, bCircular;
                                                
                                                            len = a.length;
                                                            if ( len !== b.length ) {
                                                Severity: Minor
                                                Found in external/qunit/qunit.js - About 1 hr to fix

                                                  Function objectType has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  function objectType( obj ) {
                                                      if ( typeof obj === "undefined" ) {
                                                          return "undefined";
                                                      }
                                                  
                                                  
                                                  Severity: Minor
                                                  Found in external/qunit/qunit.js - About 1 hr to fix

                                                    Function queue has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        queue: function() {
                                                            var priority,
                                                                test = this;
                                                    
                                                            if ( !this.valid() ) {
                                                    Severity: Minor
                                                    Found in external/qunit/qunit.js - About 1 hr to fix

                                                      Function object has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                                      object: function( map, stack ) {
                                                                          var keys, key, val, i, nonEnumerableProperties,
                                                                              ret = [];
                                                      
                                                                          if ( dump.maxDepth && dump.depth > dump.maxDepth ) {
                                                      Severity: Minor
                                                      Found in external/qunit/qunit.js - About 1 hr to fix

                                                        Function extractStacktrace has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        function extractStacktrace( e, offset ) {
                                                            offset = offset === undefined ? 4 : offset;
                                                        
                                                            var stack, include, i;
                                                        
                                                        
                                                        Severity: Minor
                                                        Found in external/qunit/qunit.js - About 1 hr to fix

                                                          Function diffHalfMatchI has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                                  function diffHalfMatchI( longtext, shorttext, i ) {
                                                                      var seed, j, bestCommon, prefixLength, suffixLength,
                                                                          bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB;
                                                          
                                                                      // Start with a 1/4 length substring at position i as a seed.
                                                          Severity: Minor
                                                          Found in external/qunit/qunit.js - About 1 hr to fix

                                                            Consider simplifying this complex logical expression.
                                                            Open

                                                                            if ( lastequality && ( ( preIns && preDel && postIns && postDel ) ||
                                                                                    ( ( lastequality.length < 2 ) &&
                                                                                    ( preIns + preDel + postIns + postDel ) === 3 ) ) ) {
                                                            
                                                                                // Duplicate record.
                                                            Severity: Major
                                                            Found in external/qunit/qunit.js - About 1 hr to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                      if ( x1 >= x2 ) {
                                                              
                                                                                          // Overlap detected.
                                                                                          return this.diffBisectSplit( text1, text2, x1, y1, deadline );
                                                                                      }
                                                              Severity: Major
                                                              Found in external/qunit/qunit.js - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                        if ( commonlength !== 0 ) {
                                                                                            if ( ( pointer - countDelete - countInsert ) > 0 &&
                                                                                                    diffs[ pointer - countDelete - countInsert - 1 ][ 0 ] ===
                                                                                                    DIFF_EQUAL ) {
                                                                                                diffs[ pointer - countDelete - countInsert - 1 ][ 1 ] +=
                                                                Severity: Major
                                                                Found in external/qunit/qunit.js - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                          if ( commonlength !== 0 ) {
                                                                                              diffs[ pointer ][ 1 ] = textInsert.substring( textInsert.length -
                                                                                                      commonlength ) + diffs[ pointer ][ 1 ];
                                                                                              textInsert = textInsert.substring( 0, textInsert.length -
                                                                                                  commonlength );
                                                                  Severity: Major
                                                                  Found in external/qunit/qunit.js - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                            if ( x1 >= x2 ) {
                                                                    
                                                                                                // Overlap detected.
                                                                                                return this.diffBisectSplit( text1, text2, x1, y1, deadline );
                                                                                            }
                                                                    Severity: Major
                                                                    Found in external/qunit/qunit.js - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                          if ( hasOwn.call( val.value, j ) ) {
                                                                                              urlConfigHtml += "<option value='" + escapeText( j ) + "'" +
                                                                                                  ( config[ val.id ] === j ?
                                                                                                      ( selection = true ) && " selected='selected'" : "" ) +
                                                                                                  ">" + escapeText( val.value[ j ] ) + "</option>";
                                                                      Severity: Major
                                                                      Found in external/qunit/qunit.js - About 45 mins to fix

                                                                        Function push has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                            push: function( result, actual, expected, message, negative ) {
                                                                        Severity: Minor
                                                                        Found in external/qunit/qunit.js - About 35 mins to fix

                                                                          Function diffBisectSplit has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                              DiffMatchPatch.prototype.diffBisectSplit = function( text1, text2, x, y, deadline ) {
                                                                          Severity: Minor
                                                                          Found in external/qunit/qunit.js - About 35 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                        return true;
                                                                            Severity: Major
                                                                            Found in external/qunit/qunit.js - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                          return diffsA.concat( [
                                                                                              [ DIFF_EQUAL, midCommon ]
                                                                                          ], diffsB );
                                                                              Severity: Major
                                                                              Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                        return "object";
                                                                                Severity: Major
                                                                                Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                          return resultErrorString;
                                                                                  Severity: Major
                                                                                  Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                                return this.diffLineMode( text1, text2, deadline );
                                                                                    Severity: Major
                                                                                    Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                              return regexFilter ?
                                                                                                  this.regexFilter( !!regexFilter[ 1 ], regexFilter[ 2 ], regexFilter[ 3 ], fullName ) :
                                                                                                  this.stringFilter( filter, fullName );
                                                                                      Severity: Major
                                                                                      Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                                return this.diffBisect( text1, text2, deadline );
                                                                                        Severity: Major
                                                                                        Found in external/qunit/qunit.js - About 30 mins to fix

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

                                                                                                      if ( hasOwn.call( config, "previousModule" ) ) {
                                                                                                          runLoggingCallbacks( "moduleDone", {
                                                                                                              name: config.previousModule.name,
                                                                                                              tests: config.previousModule.tests,
                                                                                                              failed: config.moduleStats.bad,
                                                                                          Severity: Major
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 3 hrs to fix
                                                                                          external/qunit/qunit.js on lines 684..693

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

                                                                                          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 ( config.previousModule ) {
                                                                                                  runLoggingCallbacks( "moduleDone", {
                                                                                                      name: config.previousModule.name,
                                                                                                      tests: config.previousModule.tests,
                                                                                                      failed: config.moduleStats.bad,
                                                                                          Severity: Major
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 3 hrs to fix
                                                                                          external/qunit/qunit.js on lines 773..782

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

                                                                                          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

                                                                                                          if ( k1 === -d || ( k1 !== d && v1[ k1Offset - 1 ] < v1[ k1Offset + 1 ] ) ) {
                                                                                                              x1 = v1[ k1Offset + 1 ];
                                                                                                          } else {
                                                                                                              x1 = v1[ k1Offset - 1 ] + 1;
                                                                                                          }
                                                                                          Severity: Major
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 2 hrs to fix
                                                                                          external/qunit/qunit.js on lines 3827..3831

                                                                                          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

                                                                                                          if ( k2 === -d || ( k2 !== d && v2[ k2Offset - 1 ] < v2[ k2Offset + 1 ] ) ) {
                                                                                                              x2 = v2[ k2Offset + 1 ];
                                                                                                          } else {
                                                                                                              x2 = v2[ k2Offset - 1 ] + 1;
                                                                                                          }
                                                                                          Severity: Major
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 2 hrs to fix
                                                                                          external/qunit/qunit.js on lines 3789..3793

                                                                                          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

                                                                                              sessionStorage: ( function() {
                                                                                                  var x = "qunit-test-string";
                                                                                                  try {
                                                                                                      sessionStorage.setItem( x, x );
                                                                                                      sessionStorage.removeItem( x );
                                                                                          Severity: Major
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 1 hr to fix
                                                                                          external/qunit/qunit.js on lines 2387..2396

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

                                                                                          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

                                                                                                  sessionStorage: ( function() {
                                                                                                      var x = "qunit-test-string";
                                                                                                      try {
                                                                                                          sessionStorage.setItem( x, x );
                                                                                                          sessionStorage.removeItem( x );
                                                                                          Severity: Major
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 1 hr to fix
                                                                                          external/qunit/qunit.js on lines 30..39

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

                                                                                          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

                                                                                                  this.pushResult( {
                                                                                                      result: !QUnit.equiv( actual, expected ),
                                                                                                      actual: actual,
                                                                                                      expected: expected,
                                                                                                      message: message,
                                                                                          Severity: Minor
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 40 mins to fix
                                                                                          external/qunit/qunit.js on lines 1533..1539

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

                                                                                          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

                                                                                                  this.pushResult( {
                                                                                                      result: !QUnit.equiv( actual, expected ),
                                                                                                      actual: actual,
                                                                                                      expected: expected,
                                                                                                      message: message,
                                                                                          Severity: Minor
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 40 mins to fix
                                                                                          external/qunit/qunit.js on lines 1514..1520

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

                                                                                          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

                                                                                                  } else {
                                                                                                      text2A = hm[ 0 ];
                                                                                                      text2B = hm[ 1 ];
                                                                                                      text1A = hm[ 2 ];
                                                                                                      text1B = hm[ 3 ];
                                                                                          Severity: Minor
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 35 mins to fix
                                                                                          external/qunit/qunit.js on lines 3646..3651

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

                                                                                          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

                                                                                                  if ( text1.length > text2.length ) {
                                                                                                      text1A = hm[ 0 ];
                                                                                                      text1B = hm[ 1 ];
                                                                                                      text2A = hm[ 2 ];
                                                                                                      text2B = hm[ 3 ];
                                                                                          Severity: Minor
                                                                                          Found in external/qunit/qunit.js and 1 other location - About 35 mins to fix
                                                                                          external/qunit/qunit.js on lines 3651..3656

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

                                                                                          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

                                                                                          There are no issues that match your filters.

                                                                                          Category
                                                                                          Status