jquery/jquery

View on GitHub

Showing 365 of 365 total issues

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 trigger has 94 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        trigger: function( event, data, elem, onlyHandlers ) {
    
            var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
                eventPath = [ elem || document ],
                type = hasOwn.call( event, "type" ) ? event.type : event,
    Severity: Major
    Found in src/event/trigger.js - About 3 hrs to fix

      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 833..842

      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 ( 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 746..755

      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

      Function makeApi has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function makeApi(sinon) {
              var push = [].push;
      
              function exposeValue(sandbox, config, key, value) {
                  if (!value) {
      Severity: Major
      Found in external/sinon/sinon.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;
                // Cache the text lengths to prevent multiple calls.
        Severity: Major
        Found in external/qunit/qunit.js - About 3 hrs to fix

          File css.js has 313 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          define( [
              "./core",
              "./var/pnum",
              "./core/access",
              "./var/document",
          Severity: Minor
          Found in src/css.js - About 3 hrs to fix

            Function makeRequire has 86 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        makeRequire: function (relMap, options) {
                            options = options || {};
            
                            function localRequire(deps, callback, errback) {
                                var id, map, requireMod;
            Severity: Major
            Found in external/requirejs/require.js - About 3 hrs to fix

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

                  fcssescape = function( ch, asCodePoint ) {
                      if ( asCodePoint ) {
              
                          // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
                          if ( ch === "\0" ) {
              Severity: Major
              Found in external/sizzle/dist/sizzle.js and 1 other location - About 3 hrs to fix
              src/selector-native.js on lines 47..61

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

              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

                  fcssescape = function( ch, asCodePoint ) {
                      if ( asCodePoint ) {
              
                          // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
                          if ( ch === "\0" ) {
              Severity: Major
              Found in src/selector-native.js and 1 other location - About 3 hrs to fix
              external/sizzle/dist/sizzle.js on lines 156..170

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

              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 CHILD has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      "CHILD": function( type, what, argument, first, last ) {
                          var simple = type.slice( 0, 3 ) !== "nth",
                              forward = type.slice( -4 ) !== "last",
                              ofType = what === "of-type";
              
              
              Severity: Major
              Found in external/sizzle/dist/sizzle.js - About 3 hrs to fix

                Function Sizzle has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function Sizzle( selector, context, results, seed ) {
                    var m, i, elem, nid, match, groups, newSelector,
                        newContext = context && context.ownerDocument,
                
                        // nodeType defaults to 9, since context defaults to document
                Severity: Major
                Found in external/sizzle/dist/sizzle.js - About 3 hrs to fix

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

                  if ( document.readyState === "complete" ||
                      ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
                  
                      // Handle it asynchronously to allow scripts the opportunity to delay ready
                      window.setTimeout( jQuery.ready );
                  Severity: Major
                  Found in src/core/ready.js and 1 other location - About 3 hrs to fix
                  src/core/ready-no-deferred.js on lines 81..94

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

                  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 ( document.readyState === "complete" ||
                      ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
                  
                      // Handle it asynchronously to allow scripts the opportunity to delay ready
                      window.setTimeout( jQuery.ready );
                  Severity: Major
                  Found in src/core/ready-no-deferred.js and 1 other location - About 3 hrs to fix
                  src/core/ready.js on lines 71..84

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

                  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 send has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              send: function( headers, complete ) {
                                  var i,
                                      xhr = options.xhr();
                  
                                  xhr.open(
                  Severity: Major
                  Found in src/ajax/xhr.js - About 3 hrs to fix

                    File core.js has 294 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /* global Symbol */
                    // Defining this global in .eslintrc.json would create a danger of using the global
                    // unguarded in another place, it seems safer to define global only for this module
                    
                    define( [
                    Severity: Minor
                    Found in src/core.js - About 3 hrs to fix

                      Function wrapMethod has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              sinon.wrapMethod = function wrapMethod(object, property, method) {
                                  if (!object) {
                                      throw new TypeError("Should wrap property of object");
                                  }
                      
                      
                      Severity: Major
                      Found in external/sinon/sinon.js - About 3 hrs to fix

                        Function makeApi has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function makeApi(sinon) {
                                var collection = {
                                    verify: function resolve() {
                                        each(this, "verify");
                                    },
                        Severity: Major
                        Found in external/sinon/sinon.js - About 3 hrs to fix

                          Function matcherFromGroupMatchers has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                              var bySet = setMatchers.length > 0,
                                  byElement = elementMatchers.length > 0,
                                  superMatcher = function( seed, context, xml, results, outermost ) {
                                      var elem, j, matcher,
                          Severity: Major
                          Found in external/sizzle/dist/sizzle.js - About 2 hrs to fix

                            Function add has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                add: function( elem, types, handler, data, selector ) {
                            
                                    var handleObjIn, eventHandle, tmp,
                                        events, t, handleObj,
                                        special, handlers, type, namespaces, origType,
                            Severity: Major
                            Found in src/event.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source