codenothing/CSSCompressor

View on GitHub

Showing 254 of 254 total issues

Avoid deeply nested control flow statements.
Open

                        if ( special[ type ] ) {
                            jQuery.event.remove( elem, type );

                        } else {
                            jQuery.removeEvent( elem, type, data.handle );
Severity: Major
Found in demo/rules/js/jquery.js - About 45 mins to fix

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

    function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
    Severity: Minor
    Found in demo/rules/js/jquery.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ( elem.id !== match[2] ) {
                                  return rootjQuery.find( selector );
                              }
      Severity: Major
      Found in demo/rules/js/jquery.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
                                if ( item ) {
                                    found = filter( item, match, i, curLoop );
                                    var pass = not ^ !!found;
        
        
        Severity: Major
        Found in demo/rules/js/jquery.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                          } else if ( copy !== undefined ) {
                              target[ name ] = copy;
                          }
          Severity: Major
          Found in demo/rules/js/jquery.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if ( pos == null ) {
                                        eventType.splice( j--, 1 );
                                    }
            Severity: Major
            Found in demo/rules/js/jquery.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( !match ) {
                                      anyFound = found = true;
              
                                  } else if ( match === true ) {
                                      continue;
              Severity: Major
              Found in demo/rules/js/jquery.js - About 45 mins to fix

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

                        ATTR: function( match, curLoop, inplace, result, not, isXML ) {
                Severity: Minor
                Found in demo/rules/js/jquery.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  else if ( line.trim().indexOf( '*/' ) === 0 ) {
                                      comexit = true;
                                  }
                  Severity: Major
                  Found in build/comment.js - About 45 mins to fix

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

                    function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
                    Severity: Minor
                    Found in demo/rules/js/jquery.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
                                                  className = className.replace(" " + classNames[c] + " ", " ");
                                              }
                      Severity: Major
                      Found in demo/rules/js/jquery.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if ( typeof cur !== "string" ) {
                                                if ( elem === cur ) {
                                                    match = true;
                                                    break;
                                                }
                        Severity: Major
                        Found in demo/rules/js/jquery.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if ( !inplace ) {
                                                  curLoop = result;
                                              }
                          Severity: Major
                          Found in demo/rules/js/jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
                                                        tbody[ j ].parentNode.removeChild( tbody[ j ] );
                                                    }
                            Severity: Major
                            Found in demo/rules/js/jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if ( ! CSSCompressor.objectsMatch( a[ i ], b[ i ] ) ) {
                                                      return false;
                                                  }
                              Severity: Major
                              Found in lib/Util.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    else if ( rule.property == graph.bottomright ) {
                                                        if ( rule.parts.length == 2 ) {
                                                            separator = true;
                                                            sections[ 0 ][ 2 ] = rule.parts[ 0 ];
                                                            sections[ 1 ][ 2 ] = rule.parts[ 1 ];
                                Severity: Major
                                Found in lib/rules/Border Radius Combinations.js - About 45 mins to fix

                                  Function callback has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      callback: function( branch, compressor ) {
                                          if ( ! branch.rules || ! branch.rules.length ) {
                                              return;
                                          }
                                  
                                  
                                  Severity: Minor
                                  Found in lib/rules/Duplicate Properties.js - About 45 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

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if ( j !== 0 && i !== 0 ) {
                                                                  compressor.log(
                                                                      "Promoting nested ID to selector front",
                                                                      branch.position
                                                                  );
                                  Severity: Major
                                  Found in lib/rules/Strict ID.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if ( rule.parts.length == 2 ) {
                                                                separator = true;
                                                                sections[ 0 ][ 1 ] = rule.parts[ 0 ];
                                                                sections[ 1 ][ 1 ] = rule.parts[ 1 ];
                                                            }
                                    Severity: Major
                                    Found in lib/rules/Border Radius Combinations.js - About 45 mins to fix

                                      Function callback has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          callback: function( branch, compressor ) {
                                              if ( ! branch.rules || ! branch.rules.length ) {
                                                  return;
                                              }
                                      
                                      
                                      Severity: Minor
                                      Found in lib/rules/Font Combinations.js - About 45 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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language