jquery/jquery

View on GitHub

Showing 155 of 155 total issues

Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function propFilter( props, specialEasing ) {
    var index, name, easing, value, hooks;

    // camelCase, specialEasing and expand cssHook pass
    for ( index in props ) {
Severity: Minor
Found in src/effects.js - About 1 hr to fix

    Function position has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        position: function() {
            if ( !this[ 0 ] ) {
                return;
            }
    
    
    Severity: Minor
    Found in src/offset.js - About 1 hr to fix

      Function addClass has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          addClass: function( value ) {
              var classes, elem, cur, curValue, clazz, j, finalValue,
                  i = 0;
      
              if ( typeof value === "function" ) {
      Severity: Minor
      Found in src/attributes/classes.js - About 1 hr to fix

        Function when has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            when: function( singleValue ) {
                var
        
                    // count of uncompleted subordinates
                    remaining = arguments.length,
        Severity: Minor
        Found in src/deferred.js - About 1 hr to fix

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

              grunt.registerTask( "promises_aplus_tests:when", function() {
                  spawnTest( this.async(),
                      "\"" + __dirname + "/../../node_modules/.bin/promises-aplus-tests\"" +
                          " test/promises_aplus_adapters/when.js" +
                          " --reporter dot" +
          Severity: Major
          Found in build/tasks/promises_aplus_tests.js and 1 other location - About 1 hr to fix
          build/tasks/promises_aplus_tests.js on lines 10..17

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

          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

              grunt.registerTask( "promises_aplus_tests:deferred", function() {
                  spawnTest( this.async(),
                      "\"" + __dirname + "/../../node_modules/.bin/promises-aplus-tests\"" +
                          " test/promises_aplus_adapters/deferred.js" +
                          " --reporter dot" +
          Severity: Major
          Found in build/tasks/promises_aplus_tests.js and 1 other location - About 1 hr to fix
          build/tasks/promises_aplus_tests.js on lines 19..26

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

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

              remove: function( owner, key ) {
                  var i,
                      cache = owner[ this.expando ];
          
                  if ( cache === undefined ) {
          Severity: Minor
          Found in src/data/Data.js - About 1 hr to fix

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

                    even: createPositionalPseudo( function( matchIndexes, length ) {
                        var i = 0;
                        for ( ; i < length; i += 2 ) {
                            matchIndexes.push( i );
                        }
            Severity: Minor
            Found in src/selector.js and 1 other location - About 55 mins to fix
            src/selector.js on lines 1000..1006

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

            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

                    odd: createPositionalPseudo( function( matchIndexes, length ) {
                        var i = 1;
                        for ( ; i < length; i += 2 ) {
                            matchIndexes.push( i );
                        }
            Severity: Minor
            Found in src/selector.js and 1 other location - About 55 mins to fix
            src/selector.js on lines 992..998

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

            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 access has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
            Severity: Major
            Found in src/core/access.js - About 50 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if ( ( elem = matcherOut[ i ] ) ) {
              
                                          // Restore matcherIn since elem is not yet a final match
                                          temp.push( ( matcherIn[ i ] = elem ) );
                                      }
              Severity: Major
              Found in src/selector.js - About 45 mins to fix

                Function setMatcher has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                Severity: Minor
                Found in src/selector.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if ( rscriptType.test( node.type || "" ) &&
                                          !dataPriv.access( node, "globalEval" ) &&
                                          jQuery.contains( doc, node ) ) {
                  
                                          if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {
                  Severity: Major
                  Found in src/manipulation.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            for ( match in context ) {
                    
                                                // Properties of context are called as methods if possible
                                                if ( typeof this[ match ] === "function" ) {
                                                    this[ match ]( context[ match ] );
                    Severity: Major
                    Found in src/core/init.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for ( type in data.events ) {
                                                  if ( special[ type ] ) {
                                                      jQuery.event.remove( elem, type );
                      
                                                  // This is a shortcut to avoid jQuery.event.remove's overhead
                      Severity: Major
                      Found in src/manipulation.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if ( hasScripts ) {
                                                jQuery.merge( scripts, getAll( node, "script" ) );
                                            }
                        Severity: Major
                        Found in src/manipulation.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ( ( event.result = ret ) === false ) {
                                                      event.preventDefault();
                                                      event.stopPropagation();
                                                  }
                          Severity: Major
                          Found in src/event.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if ( nodeType === 9 ) {
                                                    if ( ( elem = context.getElementById( m ) ) ) {
                                                        push.call( results, elem );
                                                    }
                                                    return results;
                            Severity: Major
                            Found in src/selector.js - About 45 mins to fix

                              Function on has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              function on( elem, types, selector, data, fn, one ) {
                              Severity: Minor
                              Found in src/event.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    for ( conv2 in converters ) {
                                
                                                        // If conv2 outputs current
                                                        tmp = conv2.split( " " );
                                                        if ( tmp[ 1 ] === current ) {
                                Severity: Major
                                Found in src/ajax.js - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language