jquery/jquery

View on GitHub

Showing 255 of 255 total issues

Function diffCleanupSemantic has 71 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;
          equalities = []; // Stack of indices where equalities are found.
          equalitiesLength = 0; // Keeping our own length var is faster in JS.
Severity: Major
Found in external/qunit/qunit.js - About 2 hrs to fix

    Function resolve has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                        function resolve( depth, deferred, handler, special ) {
                            return function() {
                                var that = this,
                                    args = arguments,
                                    mightThrow = function() {
    Severity: Major
    Found in src/deferred.js - About 2 hrs to fix

      Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function done( status, nativeStatusText, responses, headers ) {
                  var isSuccess, success, error, response, modified,
                      statusText = nativeStatusText;
      
                  // Ignore repeat invocations
      Severity: Major
      Found in src/ajax.js - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                                if ( forward && useCache ) {
        
                                    // Seek `elem` from a previously-cached index
        
                                    // ...in a gzip-friendly way
        Severity: Critical
        Found in external/sizzle/dist/sizzle.js - About 2 hrs to fix

          Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
              if ( postFilter && !postFilter[ expando ] ) {
                  postFilter = setMatcher( postFilter );
              }
              if ( postFinder && !postFinder[ expando ] ) {
          Severity: Major
          Found in external/sizzle/dist/sizzle.js - About 2 hrs to fix

            Function check has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        check: function () {
                            if (!this.enabled || this.enabling) {
                                return;
                            }
            
            
            Severity: Major
            Found in external/requirejs/require.js - About 2 hrs to fix

              Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      superMatcher = function( seed, context, xml, results, outermost ) {
                          var elem, j, matcher,
                              matchedCount = 0,
                              i = "0",
                              unmatched = seed && [],
              Severity: Major
              Found in external/sizzle/dist/sizzle.js - About 2 hrs to fix

                Function rejects has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                          value: function rejects(promise, expected, message) {
                              var result = false;
                
                              var currentTest = this instanceof Assert && this.test || config.current;
                
                
                Severity: Major
                Found in external/qunit/qunit.js - About 2 hrs to fix

                  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 6112..6116

                  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 (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 6149..6153

                  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

                  Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function ajaxConvert( s, response, jqXHR, isSuccess ) {
                      var conv2, current, conv, tmp, prev,
                          converters = {},
                  
                          // Work with a copy of dataTypes in case we need to modify it for conversion
                  Severity: Major
                  Found in src/ajax.js - About 2 hrs to fix

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

                        if ( hasDuplicate ) {
                            while ( (elem = results[i++]) ) {
                                if ( elem === results[ i ] ) {
                                    j = duplicates.push( i );
                                }
                    Severity: Major
                    Found in external/sizzle/dist/sizzle.js and 1 other location - About 2 hrs to fix
                    src/selector-native.js on lines 115..124

                    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

                        if ( hasDuplicate ) {
                            while ( ( elem = results[ i++ ] ) ) {
                                if ( elem === results[ i ] ) {
                                    j = duplicates.push( i );
                                }
                    Severity: Major
                    Found in src/selector-native.js and 1 other location - About 2 hrs to fix
                    external/sizzle/dist/sizzle.js on lines 1066..1075

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

                          function toolbarChanged() {
                              var updatedUrl,
                                  value,
                                  tests,
                                  field = this,
                    Severity: Major
                    Found in external/qunit/qunit.js - About 2 hrs to fix

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

                      define( [
                          "./core",
                          "./core/access",
                          "./var/rcssNum",
                          "./var/isIE",
                      Severity: Minor
                      Found in src/css.js - About 2 hrs to fix

                        Function send has 57 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 2 hrs to fix

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

                          function domManip( collection, args, callback, ignored ) {
                          
                              // Flatten any nested arrays
                              args = concat.apply( [], args );
                          
                          
                          Severity: Major
                          Found in src/manipulation.js - About 2 hrs to fix

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

                                    function checkLoaded() {
                                        var err, usingPathFallback,
                                            waitInterval = config.waitSeconds * 1000,
                                            //It is possible to disable the wait interval by using waitSeconds of 0.
                                            expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
                            Severity: Major
                            Found in external/requirejs/require.js - About 2 hrs to fix

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

                                  init = jQuery.fn.init = function( selector, context, root ) {
                                      var match, elem;
                              
                                      // HANDLE: $(""), $(null), $(undefined), $(false)
                                      if ( !selector ) {
                              Severity: Major
                              Found in src/core/init.js - About 2 hrs to fix

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

                                        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
                                            var url, pluginModule, suffix, nameParts,
                                                prefix = null,
                                                parentName = parentModuleMap ? parentModuleMap.name : null,
                                                originalName = name,
                                Severity: Major
                                Found in external/requirejs/require.js - About 2 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language