jquery/jquery

View on GitHub

Showing 373 of 373 total issues

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

            callsArgWith: function callsArgWith(pos) {
                if (typeof pos !== "number") {
                    throw new TypeError("argument index is not number");
                }

Severity: Major
Found in external/sinon/sinon.js and 2 other locations - About 2 hrs to fix
external/sinon/sinon.js on lines 3209..3221
external/sinon/sinon.js on lines 3233..3245

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

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 3 locations. Consider refactoring.
Open

            yieldsToOn: function (prop, context) {
                if (typeof context !== "object") {
                    throw new TypeError("argument context is not an object");
                }

Severity: Major
Found in external/sinon/sinon.js and 2 other locations - About 2 hrs to fix
external/sinon/sinon.js on lines 3158..3170
external/sinon/sinon.js on lines 3209..3221

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

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 3 locations. Consider refactoring.
Open

            yieldsOn: function (context) {
                if (typeof context !== "object") {
                    throw new TypeError("argument context is not an object");
                }

Severity: Major
Found in external/sinon/sinon.js and 2 other locations - About 2 hrs to fix
external/sinon/sinon.js on lines 3158..3170
external/sinon/sinon.js on lines 3233..3245

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

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 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 check has 69 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

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

                  atMost: function atMost(num) {
                      if (typeof num !== "number") {
                          throw new TypeError("'" + num + "' is not number");
                      }
      
      
      Severity: Major
      Found in external/sinon/sinon.js and 1 other location - About 2 hrs to fix
      external/sinon/sinon.js on lines 3852..3865

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

      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

                  atLeast: function atLeast(num) {
                      if (typeof num !== "number") {
                          throw new TypeError("'" + num + "' is not number");
                      }
      
      
      Severity: Major
      Found in external/sinon/sinon.js and 1 other location - About 2 hrs to fix
      external/sinon/sinon.js on lines 3867..3880

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

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

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

                    configure: function (cfg) {
                        //Make sure the baseUrl ends in a slash.
                        if (cfg.baseUrl) {
                            if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
                                cfg.baseUrl += '/';
        Severity: Major
        Found in external/requirejs/require.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

              File Gruntfile.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              module.exports = function( grunt ) {
                  "use strict";
              
                  function readOptionalJSON( filepath ) {
                      var stripJSONComments = require( "strip-json-comments" ),
              Severity: Minor
              Found in Gruntfile.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 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 match has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function match(expectation, message) {
                                var m = sinon.create(matcher);
                                var type = sinon.typeOf(expectation);
                                switch (type) {
                                case "object":
                    Severity: Major
                    Found in external/sinon/sinon.js - About 2 hrs to fix

                      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

                      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 116..125

                        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 1060..1069

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language