ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

Avoid deeply nested control flow statements.
Open

                    if ( typeof cur !== "string" ) {
                        if ( elem === cur ) {
                            match = true;
                            break;
                        }
Severity: Major
Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.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-ui/development-bundle/jquery-1.7.2.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ( !inplace ) {
                              curLoop = result;
                          }
      Severity: Major
      Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

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

          Avoid deeply nested control flow statements.
          Open

                              if ( !isXML ) {
                                  elem[ expando ] = doneName;
                                  elem.sizset = i;
                              }
          Severity: Major
          Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.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-ui/development-bundle/jquery-1.7.2.js - About 45 mins to fix

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

                def load_config
                  begin
                    retried_after_update = false
                    begin
                      load_and_remember config_tracker.central_config_file
              Severity: Minor
              Found in app/models/project.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

              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-ui/development-bundle/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 public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 45 mins to fix

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

                    def build_without_serialization(revision, reasons)
                      return if revision.nil? # this will only happen in the case that there are no revisions yet
                  
                      notify(:build_initiated)
                      previous_build = last_build
                  Severity: Minor
                  Found in app/models/project.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

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

                  function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
                          dataType /* internal */, inspected /* internal */ ) {
                  Severity: Minor
                  Found in public/javascripts/jquery-ui/development-bundle/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 public/javascripts/jquery-ui/development-bundle/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 public/javascripts/jquery-ui/development-bundle/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 public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.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-ui/development-bundle/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 public/javascripts/jquery-ui/development-bundle/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 public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.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-ui/development-bundle/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 public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.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-ui/development-bundle/jquery-1.7.2.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language