kennethkalmer/powerdns-on-rails

View on GitHub

Showing 157 of 179 total issues

Avoid deeply nested control flow statements.
Open

                    if ( !anyFound ) {
                        return [];
                    }
Severity: Major
Found in public/javascripts/jquery.js - About 45 mins to fix

    Function CLASS has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            CLASS: function( match, curLoop, inplace, result, not, isXML ) {
    Severity: Minor
    Found in public/javascripts/jquery.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ( jQuery.isPlainObject( context ) ) {
                                  selector = [ document.createElement( ret[1] ) ];
                                  jQuery.fn.attr.call( selector, context, true );
      
                              } else {
      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++ ) {
                                    if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
                                        setClass += " " + classNames[c];
                                    }
                                }
        Severity: Major
        Found in public/javascripts/jquery.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if ( !isXML ) {
                                  elem.sizcache = doneName;
                                  elem.sizset = i;
                              }
          Severity: Major
          Found in public/javascripts/jquery.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if ( special[ type ] ) {
                                        jQuery.event.remove( elem, type );
            
                                    // This is a shortcut to avoid jQuery.event.remove's overhead
                                    } else {
            Severity: Major
            Found in public/javascripts/jquery.js - About 45 mins to fix

              Function dirCheck has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
              Severity: Minor
              Found in public/javascripts/jquery.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if ( !inplace ) {
                                        curLoop = result;
                                    }
                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

                  Consider simplifying this complex logical expression.
                  Open

                  if ( !jQuery.support.opacity ) {
                      jQuery.cssHooks.opacity = {
                          get: function( elem, computed ) {
                              // IE uses filters for opacity
                              return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
                  Severity: Major
                  Found in public/javascripts/jquery.js - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if ( s.crossDomain == null ) {
                                parts = rurl.exec( s.url.toLowerCase() );
                                s.crossDomain = !!( parts &&
                                    ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
                                        ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
                    Severity: Major
                    Found in public/javascripts/jquery.js - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                          if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
                              return;
                          }
                      Severity: Major
                      Found in public/javascripts/jquery.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
                                        Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
                        
                                    ret = Sizzle.find( parts.shift(), context, contextXML );
                                    context = ret.expr ?
                        Severity: Major
                        Found in public/javascripts/jquery.js - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                          if ( jQuery.expr && jQuery.expr.filters ) {
                              jQuery.expr.filters.hidden = function( elem ) {
                                  var width = elem.offsetWidth,
                                      height = elem.offsetHeight;
                          
                          
                          Severity: Major
                          Found in public/javascripts/jquery.js - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {
                                        return;
                                    }
                            Severity: Major
                            Found in public/javascripts/jquery.js - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                              if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
                                                  (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
                                                  type === "select-multiple" ) {
                                                  testChange.call( this, e );
                                              }
                              Severity: Major
                              Found in public/javascripts/jquery.js - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        } else if ( typeof value === "string" && !rnocache.test( value ) &&
                                            (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
                                            !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
                                
                                            value = value.replace(rxhtmlTag, "<$1></$2>");
                                Severity: Major
                                Found in public/javascripts/jquery.js - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                      if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){
                                                          t_class = "_right";
                                                          arrow_top = Math.round(tip_h - 13) / 2;
                                                          arrow_left = -12;
                                                          marg_left = Math.round(left + org_width + opts.edgeOffset);
                                  Severity: Major
                                  Found in public/javascripts/jquery.tipTip.js - About 40 mins to fix

                                    Function PSEUDO has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            PSEUDO: function( match, curLoop, inplace, result, not ) {
                                    Severity: Minor
                                    Found in public/javascripts/jquery.js - About 35 mins to fix

                                      Method hijack_method has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                        def hijack_method(klass, method_name, eval_string = nil, arg_names = [], &block)
                                      Severity: Minor
                                      Found in lib/hijacker.rb - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language