jquery/jquery

View on GitHub

Showing 263 of 263 total issues

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

      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 diffHalfMatch has 53 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;
        
                  longtext = text1.length > text2.length ? text1 : text2;
                  shorttext = text1.length > text2.length ? text2 : text1;
        Severity: Major
        Found in external/qunit/qunit.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 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 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

                    Function diffCleanupEfficiency has 49 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.
                              equalitiesLength = 0; // Keeping our own length var is faster in JS.
                    Severity: Minor
                    Found in external/qunit/qunit.js - About 1 hr to fix

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

                                    for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
                                        args[_key - 5] = arguments[_key];
                                    }
                      Severity: Major
                      Found in external/qunit/qunit.js and 1 other location - About 1 hr to fix
                      external/qunit/qunit.js on lines 4208..4210

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

                      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

                            for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                                args[_key - 1] = arguments[_key];
                            }
                      Severity: Major
                      Found in external/qunit/qunit.js and 1 other location - About 1 hr to fix
                      external/qunit/qunit.js on lines 5497..5499

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

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

                      module.exports = function( Release ) {
                      
                          var
                              files = [
                                  "dist/jquery.js",
                      Severity: Minor
                      Found in build/release.js - About 1 hr to fix

                        Function select has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        select = Sizzle.select = function( selector, context, results, seed ) {
                            var i, tokens, token, type, find,
                                compiled = typeof selector === "function" && selector,
                                match = !seed && tokenize( (selector = compiled.selector || selector) );
                        
                        
                        Severity: Minor
                        Found in external/sizzle/dist/sizzle.js - About 1 hr to fix

                          Function matcherFromTokens has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function matcherFromTokens( tokens ) {
                              var checkContext, matcher, j,
                                  len = tokens.length,
                                  leadingRelative = Expr.relative[ tokens[0].type ],
                                  implicitRelative = leadingRelative || Expr.relative[" "],
                          Severity: Minor
                          Found in external/sizzle/dist/sizzle.js - About 1 hr to fix

                            Function addCombinator has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function addCombinator( matcher, combinator, base ) {
                                var dir = combinator.dir,
                                    skip = combinator.next,
                                    key = skip || dir,
                                    checkNonElements = base && key === "parentNode",
                            Severity: Minor
                            Found in external/sizzle/dist/sizzle.js - About 1 hr to fix

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

                              module.exports = function( grunt ) {
                              
                                  "use strict";
                              
                                  var    fs = require( "fs" ),
                              Severity: Minor
                              Found in build/tasks/dist.js - About 1 hr to fix

                                Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
                                    var matched, match, tokens, type,
                                        soFar, groups, preFilters,
                                        cached = tokenCache[ selector + " " ];
                                
                                
                                Severity: Minor
                                Found in external/sizzle/dist/sizzle.js - About 1 hr to fix

                                  Function enable has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              enable: function () {
                                                  enabledRegistry[this.map.id] = this;
                                                  this.enabled = true;
                                  
                                                  //Set flag mentioning that the module is enabling,
                                  Severity: Minor
                                  Found in external/requirejs/require.js - About 1 hr to fix

                                    Function val has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        val: function( value ) {
                                            var hooks, ret, valueIsFunction,
                                                elem = this[ 0 ];
                                    
                                            if ( !arguments.length ) {
                                    Severity: Minor
                                    Found in src/attributes/val.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language