kennethkalmer/powerdns-on-rails

View on GitHub

Showing 157 of 179 total issues

Function _Deferred has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _Deferred: function() {
        var // callbacks list
            callbacks = [],
            // stored [ context , args ]
            fired,
Severity: Major
Found in public/javascripts/jquery.js - About 2 hrs to fix

    Function liveHandler has 61 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function liveHandler( event ) {
        var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
            elems = [],
            selectors = [],
            events = jQuery._data( this, "events" );
    Severity: Major
    Found in public/javascripts/jquery.js - About 2 hrs to fix

      Function Deferred has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Deferred: function( func ) {
              var deferred = jQuery._Deferred(),
                  failDeferred = jQuery._Deferred(),
                  promise;
              // Add errorDeferred methods, then and promise
      Severity: Major
      Found in public/javascripts/jquery.js - About 2 hrs to fix

        Function ajaxConvert has 57 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function ajaxConvert( s, response ) {
        
            // Apply the dataFilter if provided
            if ( s.dataFilter ) {
                response = s.dataFilter( response, s.dataType );
        Severity: Major
        Found in public/javascripts/jquery.js - About 2 hrs to fix

          Method create has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

            def create
              @domain = Domain.new( params[:domain] )
          
              unless @domain.slave?
                @zone_template = ZoneTemplate.find(params[:domain][:zone_template_id]) unless params[:domain][:zone_template_id].blank?
          Severity: Minor
          Found in app/controllers/domains_controller.rb - About 2 hrs 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 offset has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              jQuery.fn.offset = function( options ) {
                  var elem = this[0];
          
                  if ( options ) {
                      return this.each(function( i ) {
          Severity: Major
          Found in public/javascripts/jquery.js - About 2 hrs to fix

            Class AuthToken has 21 methods (exceeds 20 allowed). Consider refactoring.
            Open

            class AuthToken < ActiveRecord::Base
            
              class Denied < ::Exception
              end
            
            
            Severity: Minor
            Found in app/models/auth_token.rb - About 2 hrs to fix

              Method create has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def create
                  if params[:auth_token].blank?
                    render :status => 422, :xml => <<-EOS
              <error>#{t(:message_token_missing_parametr)}</error>
              EOS
              Severity: Major
              Found in app/controllers/auth_tokens_controller.rb - About 2 hrs to fix

                Function name has 47 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 public/javascripts/jquery.js - About 1 hr to fix

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

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

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

                    function ajaxHandleResponses( s, jqXHR, responses ) {
                    
                        var contents = s.contents,
                            dataTypes = s.dataTypes,
                            responseFields = s.responseFields,
                    Severity: Minor
                    Found in public/javascripts/jquery.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 public/javascripts/jquery.js - About 1 hr to fix

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

                            removeData: function( elem, name, pvt /* Internal Use Only */ ) {
                                if ( !jQuery.acceptData( elem ) ) {
                                    return;
                                }
                        
                        
                        Severity: Minor
                        Found in public/javascripts/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 public/javascripts/jquery.js - About 1 hr to fix

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

                                data: function( elem, name, data, pvt /* Internal Use Only */ ) {
                                    if ( !jQuery.acceptData( elem ) ) {
                                        return;
                                    }
                            
                            
                            Severity: Minor
                            Found in public/javascripts/jquery.js - About 1 hr to fix

                              Function load has 44 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 public/javascripts/jquery.js - About 1 hr to fix

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

                                    step: function( gotoEnd ) {
                                        var t = fxNow || createFxNow(),
                                            done = true,
                                            elem = this.elem,
                                            options = this.options,
                                Severity: Minor
                                Found in public/javascripts/jquery.js - About 1 hr to fix

                                  Function handleRemote has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      handleRemote: function(element) {
                                        var method, url, data,
                                          crossDomain = element.data('cross-domain') || null,
                                          dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
                                  
                                  
                                  Severity: Minor
                                  Found in public/javascripts/jquery_ujs.js - About 1 hr to fix

                                    Function data has 41 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 public/javascripts/jquery.js - About 1 hr to fix

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

                                          attr: function( elem, name, value, pass ) {
                                              var nType = elem.nodeType;
                                              
                                              // don't get/set attributes on text, comment and attribute nodes
                                              if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
                                      Severity: Minor
                                      Found in public/javascripts/jquery.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language