kennethkalmer/powerdns-on-rails

View on GitHub

Showing 157 of 179 total issues

Function show has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    show: function( speed, easing, callback ) {
        var elem, display;

        if ( speed || speed === 0 ) {
            return this.animate( genFx("show", 3), speed, easing, callback);
Severity: Minor
Found in public/javascripts/jquery.js - About 1 hr to fix

    Function custom has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        custom: function( from, to, unit ) {
            var self = this,
                fx = jQuery.fx,
                raf;
    
    
    Severity: Minor
    Found in public/javascripts/jquery.js - About 1 hr to fix

      Function type has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          jQuery.fn[ type ] = function( size ) {
              // Get window width or height
              var elem = this[0];
              if ( !elem ) {
                  return size == null ? null : this;
      Severity: Minor
      Found in public/javascripts/jquery.js - About 1 hr to fix

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

            handle: function( event ) {
                event = jQuery.event.fix( event || window.event );
                // Snapshot the handlers list since a called handler may add/remove events.
                var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
                    run_all = !event.exclusive && !event.namespace,
        Severity: Minor
        Found in public/javascripts/jquery.js - About 1 hr to fix

          Function find has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Sizzle.find = function( expr, context, isXML ) {
              var set;
          
              if ( !expr ) {
                  return [];
          Severity: Minor
          Found in public/javascripts/jquery.js - About 1 hr to fix

            Function cloneFixAttributes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function cloneFixAttributes( src, dest ) {
                var nodeName;
            
                // We do not need to do anything for non-Elements
                if ( dest.nodeType !== 1 ) {
            Severity: Minor
            Found in public/javascripts/jquery.js - About 1 hr to fix

              Function > has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      ">": function( checkSet, part ) {
                          var elem,
                              isPartStr = typeof part === "string",
                              i = 0,
                              l = checkSet.length;
              Severity: Minor
              Found in public/javascripts/jquery.js - About 1 hr to fix

                Function toggleClass has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    toggleClass: function( value, stateVal ) {
                        var type = typeof value,
                            isBool = typeof stateVal === "boolean";
                
                        if ( jQuery.isFunction( value ) ) {
                Severity: Minor
                Found in public/javascripts/jquery.js - About 1 hr to fix

                  Method can_change? has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def can_change?( record, type = '*' )
                      name, type = get_name_and_type_from_param( record, type )
                  
                      # NS records?
                      return false if type == 'NS' || type == 'SOA'
                  Severity: Minor
                  Found in app/models/auth_token.rb - 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

                  Method build has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def build( domain_name = nil )
                      # get the class of the record_type
                      record_class = self.record_type.constantize
                  
                      # duplicate our own attributes, strip out the ones the destination doesn't
                  Severity: Minor
                  Found in app/models/record_template.rb - 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

                  Avoid deeply nested control flow statements.
                  Open

                                          if ( special.remove ) {
                                              special.remove.call( elem, handleObj );
                                          }
                  Severity: Major
                  Found in public/javascripts/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 public/javascripts/jquery.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if ( ret[r] === ret[n] ) {
                                                  ret.splice(n--, 1);
                                                  break;
                                              }
                      Severity: Major
                      Found in public/javascripts/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 public/javascripts/jquery.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                              if ( xhrOnUnloadAbort ) {
                                                                  delete xhrCallbacks[ handle ];
                                                              }
                          Severity: Major
                          Found in public/javascripts/jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if ( copyIsArray ) {
                                                    copyIsArray = false;
                                                    clone = src && jQuery.isArray(src) ? src : [];
                            
                                                } else {
                            Severity: Major
                            Found in public/javascripts/jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                  if ( !status && s.isLocal && !s.crossDomain ) {
                                                                      status = responses.text ? 200 : 404;
                                                                  // IE - #1450: sometimes returns 1223 when it should be 204
                                                                  } else if ( status === 1223 ) {
                                                                      status = 204;
                              Severity: Major
                              Found in public/javascripts/jquery.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    if ( related && jQuery.contains( elem, related ) ) {
                                                        related = elem;
                                                    }
                                Severity: Major
                                Found in public/javascripts/jquery.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
                                                          conv2 = converters[ tmp[1] + " " + current ];
                                                          if ( conv2 ) {
                                                              conv1 = converters[ conv1 ];
                                                              if ( conv1 === true ) {
                                  Severity: Major
                                  Found in public/javascripts/jquery.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if ( !old ) {
                                                            context.setAttribute( "id", nid );
                                                        } else {
                                                            nid = nid.replace( /'/g, "\\$&" );
                                                        }
                                    Severity: Major
                                    Found in public/javascripts/jquery.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language