jquery/jquery

View on GitHub

Showing 311 of 374 total issues

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

      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

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

              function makeApi(sinon) {
          
                  // Adapted from https://developer.mozilla.org/en/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug
                  var hasDontEnumBug = (function () {
                      var obj = {
          Severity: Major
          Found in external/sinon/sinon.js - About 2 hrs to fix

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

                function makeApi(sinon) {
                    sinon.Event = function Event(type, bubbles, cancelable, target) {
                        this.initEvent(type, bubbles, cancelable, target);
                    };
            
            
            Severity: Major
            Found in external/sinon/sinon.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 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 defake has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      FakeXMLHttpRequest.defake = function defake(fakeXhr, xhrArgs) {
                          var xhr = new sinonXhr.workingXHR(); // eslint-disable-line new-cap
                  
                          each([
                              "open",
                  Severity: Major
                  Found in external/sinon/sinon.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 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 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 makeApi has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function makeApi(sinon) {
                                  var slice = Array.prototype.slice;
                          
                                  function test(callback) {
                                      var type = typeof callback;
                          Severity: Major
                          Found in external/sinon/sinon.js - About 2 hrs to fix

                            File core.js has 256 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 2 hrs to fix

                              Function remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  remove: function( elem, types, handler, selector, mappedTypes ) {
                              
                                      var j, origCount, tmp,
                                          events, t, handleObj,
                                          special, handlers, type, namespaces, origType,
                              Severity: Major
                              Found in src/event.js - About 2 hrs to fix

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

                                module.exports = function( grunt ) {
                                
                                    "use strict";
                                
                                    grunt.registerTask( "testswarm", function( commit, configFile, projectName, browserSets,
                                Severity: Major
                                Found in build/tasks/testswarm.js - About 2 hrs to fix

                                  Function makeModuleMap has 52 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

                                    Function buildFragment has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function buildFragment( elems, context, scripts, selection, ignored ) {
                                        var elem, tmp, tag, wrap, attached, j,
                                            fragment = context.createDocumentFragment(),
                                            nodes = [],
                                            i = 0,
                                    Severity: Major
                                    Found in src/manipulation/buildFragment.js - About 2 hrs to fix

                                      Function normalize has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              function normalize(name, baseName, applyMap) {
                                                  var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
                                                      foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
                                                      baseParts = (baseName && baseName.split('/')),
                                                      map = config.map,
                                      Severity: Major
                                      Found in external/requirejs/require.js - About 2 hrs to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                        if ( ( mappedTypes || origType === handleObj.origType ) &&
                                                            ( !handler || handler.guid === handleObj.guid ) &&
                                                            ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                                            ( !selector || selector === handleObj.selector ||
                                                                selector === "**" && handleObj.selector ) ) {
                                        Severity: Critical
                                        Found in src/event.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language