codenothing/CSSCompressor

View on GitHub

Showing 179 of 254 total issues

Avoid too many return statements within this function.
Open

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

    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 true;
      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 ( diff % first === 0 && diff / first >= 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 undefined;
              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.css( type, typeof size === "string" ? size : size + "px" );
                Severity: Major
                Found in demo/rules/js/jquery.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                              return 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 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 rootjQuery.ready( 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.style.cssText;
                        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

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

                                callback: function( branch, compressor ) {
                                    if ( ! branch.atrule || ! branch.parts.length || ( branch.rules && branch.rules.length > 0 ) ) {
                                        return;
                                    }
                            
                            
                            Severity: Minor
                            Found in lib/rules/Atrule URL Trim.js - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                callback: function( branch, compressor ) {
                                    if ( ! branch.rules || ! branch.rules.length ) {
                                        return;
                                    }
                            
                            
                            Severity: Minor
                            Found in lib/rules/Border, Outline Style Combinations.js - About 25 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 compress has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                compress: function( css, options ) {
                                    var self = this, now = Date.now();
                            
                                    // Clear result
                                    self.css = '';
                            Severity: Minor
                            Found in lib/CSSCompressor.js - About 25 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 rulesMatch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                rulesMatch = function( a, b ) {
                                    if ( ! a || ! b || a.length !== b.length ) {
                                        return false;
                                    }
                            
                            
                            Severity: Minor
                            Found in lib/rules/Common Rules.js - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                callback: function( branch, compressor ) {
                                    if ( ! branch.rules || ! branch.rules.length ) {
                                        return;
                                    }
                            
                            
                            Severity: Minor
                            Found in lib/rules/Empty Values.js - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                callback: function( rule, branch, compressor ) {
                                    if ( ! rfontfamilyprop.exec( rule.property ) || ! rule.parts || ! rule.parts.length ) {
                                        return;
                                    }
                            
                            
                            Severity: Minor
                            Found in lib/rules/Font Family Quotes.js - About 25 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