codenothing/CSSCompressor

View on GitHub

Showing 179 of 254 total issues

Function rule has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    rule: function( options, type, callback ) {
        var rules = CSSCompressor._rules;

        // Passing no arguments returns the entire list
        if ( options === undefined ) {
Severity: Minor
Found in lib/Rules.js - About 1 hr to fix

    Function domManip has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        domManip: function( args, table, callback ) {
            var results, first, fragment, parent,
                value = args[0],
                scripts = [];
    
    
    Severity: Minor
    Found in demo/rules/js/jquery.js - About 1 hr to fix

      Function closest has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          closest: function( selectors, context ) {
              var ret = [], i, l, cur = this[0];
      
              if ( jQuery.isArray( selectors ) ) {
                  var match, selector,
      Severity: Minor
      Found in demo/rules/js/jquery.js - About 1 hr to fix

        Function CHILD has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                CHILD: function( elem, match ) {
                    var type = match[1],
                        node = elem;
        
                    switch ( type ) {
        Severity: Minor
        Found in demo/rules/js/jquery.js - About 1 hr to fix

          Function onreadystatechange has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
                      // The request was aborted
                      if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
                          // Opera doesn't call onreadystatechange before this point
                          // so we simulate the call
          Severity: Minor
          Found in demo/rules/js/jquery.js - About 1 hr to fix

            Function extend has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

            CSSCompressor.extend = function(){
                var args = Slice.call( arguments ), i = -1, l = args.length, deep = false, target = this, name, copy;
            
                // Check for deep copy
                if ( CSSCompressor.isBoolean( args[ 0 ] ) ) {
            Severity: Minor
            Found in lib/Util.js - About 1 hr 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 name has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
                    var type, i = 0, match, namespaces, preType,
                        selector = origSelector || this.selector,
                        context = origSelector ? this : jQuery( this.context );
                    
            Severity: Minor
            Found in demo/rules/js/jquery.js - About 1 hr to fix

              Function handle has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  handle: function( event ) {
                      var all, handlers, namespaces, namespace_re, events,
                          namespace_sort = [],
                          args = jQuery.makeArray( arguments );
              
              
              Severity: Minor
              Found in demo/rules/js/jquery.js - About 1 hr to fix

                Function step has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    step: function( gotoEnd ) {
                        var t = jQuery.now(), done = true;
                
                        if ( gotoEnd || t >= this.options.duration + this.startTime ) {
                            this.now = this.end;
                Severity: Minor
                Found in demo/rules/js/jquery.js - About 1 hr to fix

                  Function extend has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jQuery.extend = jQuery.fn.extend = function() {
                       var options, name, src, copy, copyIsArray, clone,
                          target = arguments[0] || {},
                          i = 1,
                          length = arguments.length,
                  Severity: Minor
                  Found in demo/rules/js/jquery.js - About 1 hr to fix

                    Function load has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        load: function( url, params, callback ) {
                            if ( typeof url !== "string" && _load ) {
                                return _load.apply( this, arguments );
                    
                            // Don't do a request if no elements are being requested
                    Severity: Minor
                    Found in demo/rules/js/jquery.js - About 1 hr to fix

                      Function callback has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          callback: function( branch, compressor ) {
                              if ( ! branch.rules || ! branch.rules.length ) {
                                  return;
                              }
                      
                      
                      Severity: Minor
                      Found in lib/rules/Border Combinations.js - About 1 hr to fix

                        Function data has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            data: function( key, value ) {
                                var data = null;
                        
                                if ( typeof key === "undefined" ) {
                                    if ( this.length ) {
                        Severity: Minor
                        Found in demo/rules/js/jquery.js - About 1 hr to fix

                          Function callback has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              callback: function( branch, compressor ) {
                                  if ( ! branch.selector || ! branch.parts || ! branch.parts.length ) {
                                      return;
                                  }
                          
                          
                          Severity: Minor
                          Found in lib/rules/Comma Repeats.js - About 1 hr to fix

                            Function objectsMatch has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                objectsMatch: function( a, b ) {
                                    var isArray = CSSCompressor.isArray,
                                        isObject = CSSCompressor.isObject,
                                        i;
                            
                            
                            Severity: Minor
                            Found in lib/Util.js - About 1 hr to fix

                              Function callback has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  callback: function( value, position, compressor ) {
                                      var m = rfunction.exec( value ),
                                          iter = new StringIterator( ( m || [] )[ 2 ] || '' ),
                                          string = '',
                                          parts = [];
                              Severity: Minor
                              Found in lib/rules/Function Units.js - About 1 hr to fix

                                Function callback has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    callback: function( branch, compressor ) {
                                        if ( ! branch.selector || ! branch.parts || ! branch.parts.length ) {
                                            return;
                                        }
                                
                                
                                Severity: Minor
                                Found in lib/rules/Sort Multi Selectors.js - About 1 hr to fix

                                  Function eachArgs has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      eachArgs: function( items, fn ) {
                                          var i = -1, l = items.length;
                                  
                                          if ( CSSCompressor.isArray( items ) ) {
                                              for ( ; ++i < l; ) {
                                  Severity: Minor
                                  Found in lib/Util.js - About 1 hr 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 each has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      each: function( items, fn ) {
                                          var i = -1, l = items.length;
                                  
                                          if ( CSSCompressor.isArray( items ) ) {
                                              for ( ; ++i < l; ) {
                                  Severity: Minor
                                  Found in lib/Util.js - About 1 hr 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 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

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