jacquev6/ActionTree

View on GitHub

Showing 197 of 197 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 docs/_static/jquery-3.5.1.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 docs/_static/jquery-3.5.1.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 docs/_static/jquery-3.5.1.js - About 1 hr to fix

        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 docs/_static/jquery-3.5.1.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

              if ( support.matchesSelector && documentIsHTML &&
                  !nonnativeSelectorCache[ expr + " " ] &&
                  ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
                  ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
          
          
          Severity: Major
          Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                  if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
                      && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
                    switch (event.keyCode) {
                      case 37: // left
                        var prevHref = $('link[rel="prev"]').prop('href');
            Severity: Major
            Found in docs/_static/doctools.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 docs/_static/jquery-3.5.1.js and 1 other location - About 55 mins to fix
              docs/_static/jquery-3.5.1.js on lines 2268..2274

              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 docs/_static/jquery-3.5.1.js and 1 other location - About 55 mins to fix
              docs/_static/jquery-3.5.1.js on lines 2260..2266

              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 _cancel_action has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _cancel_action(self, action, now):
                      self.report.get_action_status(action)._set_cancel_time(now)
                      self.hooks.action_canceled(now, action)
              
                      if action in self.pending:
              Severity: Minor
              Found in ActionTree/__init__.py - About 55 mins 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 access has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

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

                Avoid deeply nested control flow statements.
                Open

                                                    if ( ( ofType ?
                                                        node.nodeName.toLowerCase() === name :
                                                        node.nodeType === 1 ) &&
                                                        ++diff ) {
                
                
                Severity: Major
                Found in docs/_static/jquery-3.5.1.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              if (!allfound) {
                                continue;
                              }
                  Severity: Major
                  Found in docs/_static/searchtools.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
                                                    return true;
                                                }
                    Severity: Major
                    Found in docs/_static/jquery-3.5.1.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 ( isFunction( this[ match ] ) ) {
                                                      this[ match ]( context[ match ] );
                      Severity: Major
                      Found in docs/_static/jquery-3.5.1.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( attrs[ i ] ) {
                                                    name = attrs[ i ].name;
                                                    if ( name.indexOf( "data-" ) === 0 ) {
                                                        name = camelCase( name.slice( 5 ) );
                                                        dataAttr( elem, name, data[ name ] );
                        Severity: Major
                        Found in docs/_static/jquery-3.5.1.js - About 45 mins to fix

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

                          function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
                          Severity: Minor
                          Found in docs/_static/jquery-3.5.1.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                            } else if ( match[ 2 ] ) {
                                                push.apply( results, context.getElementsByTagName( selector ) );
                                                return results;
                            
                                            // Class selector
                            Severity: Major
                            Found in docs/_static/jquery-3.5.1.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  while ( i-- ) {
                                                      groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
                                                          toSelector( groups[ i ] );
                                                  }
                              Severity: Major
                              Found in docs/_static/jquery-3.5.1.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 docs/_static/jquery-3.5.1.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 docs/_static/jquery-3.5.1.js - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language