jquery/jquery

View on GitHub

Showing 135 of 373 total issues

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

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

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

    define( [
        "./core",
        "./var/pnum",
        "./core/access",
        "./core/camelCase",
    Severity: Minor
    Found in src/css.js - About 3 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

        File core.js has 254 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 match has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              match = function match(object, matcher) {
                  if (matcher && typeof matcher.test === "function") {
                      return matcher.test(object);
                  }
          
          
          Severity: Minor
          Found in external/sinon/sinon.js - About 2 hrs to fix

            Function diffCompute has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                DiffMatchPatch.prototype.diffCompute = function( text1, text2, checklines, deadline ) {
                    var diffs, longtext, shorttext, i, hm,
                        text1A, text2A, text1B, text2B,
                        midCommon, diffsA, diffsB;
            
            
            Severity: Minor
            Found in external/qunit/qunit.js - About 2 hrs to fix

              Function deepEqual has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      sinon.deepEqual = function deepEqual(a, b) {
                          if (sinon.match && sinon.match.isMatcher(a)) {
                              return a.test(b);
                          }
              
              
              Severity: Minor
              Found in external/sinon/sinon.js - About 1 hr to fix

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

                        DiffMatchPatch.prototype.diffLineMode = function( text1, text2, deadline ) {
                            var a, diffs, linearray, pointer, countInsert,
                                countDelete, textInsert, textDelete, j;
                    
                            // Scan the text on a line-by-line basis first.
                    Severity: Minor
                    Found in external/qunit/qunit.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 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 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 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 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

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

                                      function makeApi(sinon) {
                                          function Server() {}
                                          Server.prototype = sinon.fakeServer;
                                  
                                          sinon.fakeServerWithClock = new Server();
                                  Severity: Minor
                                  Found in external/sinon/sinon.js - About 1 hr to fix

                                    Function data has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        data: function( key, value ) {
                                            var i, name, data,
                                                elem = this[ 0 ],
                                                attrs = elem && elem.attributes;
                                    
                                    
                                    Severity: Minor
                                    Found in src/data.js - About 1 hr to fix

                                      Function exports has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                      Open

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

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function makeArchives has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function makeArchives( Release, callback ) {
                                      
                                          Release.chdir( Release.dir.repo );
                                      
                                          function makeArchive( cdn, files, callback ) {
                                      Severity: Minor
                                      Found in build/release/cdn.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language