pjambet/beech-server

View on GitHub

Showing 137 of 166 total issues

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

jQuery.buildFragment = function( args, nodes, scripts ) {
    var fragment, cacheable, cacheresults, doc,
    first = args[ 0 ];

    // nodes may contain either an explicit document object,
Severity: Minor
Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                    if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
    
                        event.data = handleObj.data;
                        event.handleObj = handleObj;
    
    
    Severity: Major
    Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 1 hr 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 doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                    if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                        ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                        !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
        
                        value = value.replace( rxhtmlTag, "<$1></$2>" );
        Severity: Major
        Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                  if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
                      return;
                  }
          Severity: Major
          Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 1 hr to fix

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

              def update
                self.resource = resource_class.reset_password_by_token(resource_params)
            
                if resource.errors.empty?
                  resource.unlock_access! if unlockable?(resource)
            Severity: Minor
            Found in app/controllers/users/passwords_controller.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

            Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
            Severity: Major
            Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 50 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 doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if ( !relativeHierarchySelector || hasParent ) {
                                            return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
                                        }
                Severity: Major
                Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                      if ( xml && xml.documentElement /* #4958 */ ) {
                                                          responses.xml = xml;
                                                      }
                  Severity: Major
                  Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            for ( c = 0, cl = classNames.length; c < cl; c++ ) {
                                                className = className.replace(" " + classNames[ c ] + " ", " ");
                                            }
                    Severity: Major
                    Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.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 doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ( firing ) {
                                                            if ( i <= firingLength ) {
                                                                firingLength--;
                                                                if ( i <= firingIndex ) {
                                                                    firingIndex--;
                        Severity: Major
                        Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.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 doc/apidoc/javascripts/bundled/jquery-1.7.2.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 doc/apidoc/javascripts/bundled/jquery-1.7.2.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 doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    for ( i = 0; (item = curLoop[i]) != null; i++ ) {
                                                        if ( item ) {
                                                            found = filter( item, match, i, curLoop );
                                                            pass = not ^ found;
                                
                                
                                Severity: Major
                                Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.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 doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if ( !xhrCallbacks ) {
                                                                    xhrCallbacks = {};
                                                                    jQuery( window ).unload( xhrOnUnloadAbort );
                                                                }
                                    Severity: Major
                                    Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if ( selMatch[ sel ] === undefined ) {
                                                                  selMatch[ sel ] = (
                                                                      handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
                                                                  );
                                                              }
                                      Severity: Major
                                      Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language