jquery/jquery

View on GitHub

Showing 265 of 265 total issues

File manipulation.js has 352 lines of code (exceeds 250 allowed). Consider refactoring.
Open

define( [
    "./core",
    "./core/isAttached",
    "./var/concat",
    "./var/isFunction",
Severity: Minor
Found in src/manipulation.js - About 4 hrs to fix

    Function then has 102 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    then: function( onFulfilled, onRejected, onProgress ) {
                        var maxDepth = 0;
                        function resolve( depth, deferred, handler, special ) {
                            return function() {
                                var that = this,
    Severity: Major
    Found in src/deferred.js - About 4 hrs to fix

      Function exports has 100 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function( Release, files, complete ) {
      
          var
              fs = require( "fs" ),
              shell = require( "shelljs" ),
      Severity: Major
      Found in build/release/dist.js - About 4 hrs to fix

        Function Animation has 96 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Animation( elem, properties, options ) {
            var result,
                stopped,
                index = 0,
                length = Animation.prefilters.length,
        Severity: Major
        Found in src/effects.js - About 3 hrs to fix

          Function callPlugin has 96 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      callPlugin: function () {
                          var map = this.map,
                              id = map.id,
                              //Map already normalized the prefix.
                              pluginMap = makeModuleMap(map.prefix);
          Severity: Major
          Found in external/requirejs/require.js - About 3 hrs to fix

            Function TestReport has 95 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              var TestReport = function () {
                  function TestReport(name, suite, options) {
                      classCallCheck(this, TestReport);
            
                      this.name = name;
            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

                Function diffCleanupMerge has 87 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;
                          countDelete = 0;
                Severity: Major
                Found in external/qunit/qunit.js - About 3 hrs to fix

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

                  define( [
                      "./core",
                      "./core/access",
                      "./core/camelCase",
                      "./var/rcssNum",
                  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

                      Function Enumerator has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var Enumerator = function () {
                          function Enumerator(Constructor, input) {
                            classCallCheck(this, Enumerator);
                      
                            this._instanceConstructor = Constructor;
                      Severity: Major
                      Found in external/qunit/qunit.js - About 3 hrs to fix

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

                              finish: function finish() {
                                  config.current = this;
                        
                                  // Release the test callback to ensure that anything referenced has been
                                  // released to be garbage collected.
                        Severity: Major
                        Found in external/qunit/qunit.js - About 3 hrs to fix

                          Function diffBisect has 82 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.
                                    text1Length = text1.length;
                          Severity: Major
                          Found in external/qunit/qunit.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 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

                            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

                            File Gruntfile.js has 302 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 3 hrs to fix

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

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

                                  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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language