kennethkalmer/powerdns-on-rails

View on GitHub

Showing 157 of 179 total issues

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

    addClass: function( value ) {
        if ( jQuery.isFunction( value ) ) {
            return this.each(function(i) {
                var self = jQuery(this);
                self.addClass( value.call(this, i, self.attr("class") || "") );
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 html has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          html: function( value ) {
              if ( value === undefined ) {
                  return this[0] && this[0].nodeType === 1 ?
                      this[0].innerHTML.replace(rinlinejQuery, "") :
                      null;
      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 > 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 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 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 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 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

                  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

                  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 ( !anyFound ) {
                                            return [];
                                        }
                    Severity: Major
                    Found in public/javascripts/jquery.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  if ( !xhrCallbacks ) {
                                                      xhrCallbacks = {};
                                                      jQuery( window ).unload( xhrOnUnloadAbort );
                                                  }
                      Severity: Major
                      Found in public/javascripts/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 public/javascripts/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 public/javascripts/jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ( elem && elem.parentNode ) {
                                                        // Handle the case where IE and Opera return items
                                                        // by name instead of ID
                                                        if ( elem.id === match[3] ) {
                                                            return makeArray( [ elem ], extra );
                            Severity: Major
                            Found in public/javascripts/jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      for ( j = tbody.length - 1; j >= 0 ; --j ) {
                                                          if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
                                                              tbody[ j ].parentNode.removeChild( tbody[ j ] );
                                                          }
                                                      }
                              Severity: Major
                              Found in public/javascripts/jquery.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                            if ( display === "inline" ) {
                                                                this.style.display = "inline-block";
                                
                                                            } else {
                                                                this.style.display = "inline";
                                Severity: Major
                                Found in public/javascripts/jquery.js - About 45 mins to fix

                                  Method update_serial has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    def update_serial
                                      unless Record.batch_soa_updates.nil?
                                        if Record.batch_soa_updates.include?( self.id )
                                          return
                                        end
                                  Severity: Minor
                                  Found in app/models/soa.rb - 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 ( !inplace ) {
                                                          curLoop = result;
                                                      }
                                  Severity: Major
                                  Found in public/javascripts/jquery.js - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language