codenothing/CSSCompressor

View on GitHub

Showing 179 of 254 total issues

Consider simplifying this complex logical expression.
Open

        if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
                Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {

            ret = Sizzle.find( parts.shift(), context, contextXML );
            context = ret.expr ?
Severity: Major
Found in demo/rules/js/jquery.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                    if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
                        (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
                        type === "select-multiple" ) {
                        return testChange.call( this, e );
                    }
    Severity: Major
    Found in demo/rules/js/jquery.js - About 40 mins to fix

      Function PSEUDO has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

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

        Function textSelection has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        jQuery.fn.textSelection = function( start, end ) {
            return this.each(function( i, element ) {
                var textarea = jQuery( element ),
                    height = textarea.height(),
                    current, caret, ypos, range;
        Severity: Minor
        Found in demo/js/home.js - About 35 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 callback has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            callback: function( value, position, compressor ) {
                var m = rhsl.exec( value ),
                    str = '#',
                    h, s, l,
                    p, q;
        Severity: Minor
        Found in lib/rules/HSL to Hex.js - About 35 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 callback has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            callback: function( branches, compressor ) {
                function strip( array ) {
                    for ( var i = -1, branch; ++i < array.length; ) {
                        branch = array[ i ];
        
        
        Severity: Minor
        Found in lib/rules/Strip Comments.js - About 35 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 too many return statements within this function.
        Open

                                return diff === 0;
        Severity: Major
        Found in demo/rules/js/jquery.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return siblingCheck( ap[i], bp[i] );
          Severity: Major
          Found in demo/rules/js/jquery.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return jQuery( context ).find( selector );
            Severity: Major
            Found in demo/rules/js/jquery.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return this.each(function(i) {
                          var self = jQuery(this), val = value;
              
                          if ( this.nodeType !== 1 ) {
                              return;
              Severity: Major
              Found in demo/rules/js/jquery.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return false;
                Severity: Major
                Found in lib/Util.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return (context || rootjQuery).find( selector );
                  Severity: Major
                  Found in demo/rules/js/jquery.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return (elem.value || "").replace(rreturn, "");
                    Severity: Major
                    Found in demo/rules/js/jquery.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return { top: top, left: left };
                      Severity: Major
                      Found in demo/rules/js/jquery.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                            return this;
                        Severity: Major
                        Found in demo/rules/js/jquery.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return true;
                          Severity: Major
                          Found in lib/Util.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                                return elem.getAttribute("value") === null ? "on" : elem.value;
                            Severity: Major
                            Found in demo/rules/js/jquery.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return attr === null ? undefined : attr;
                              Severity: Major
                              Found in demo/rules/js/jquery.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return i === al ?
                                            siblingCheck( a, bp[i], -1 ) :
                                            siblingCheck( ap[i], b, 1 );
                                Severity: Major
                                Found in demo/rules/js/jquery.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                                      return false;
                                  Severity: Major
                                  Found in lib/Util.js - About 30 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language