ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

Avoid deeply nested control flow statements.
Open

                                    if ( xhr.readyState !== 4 ) {
                                        xhr.abort();
                                    }
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 ( !status && s.isLocal && !s.crossDomain ) {
                                            status = responses.text ? 200 : 404;
                                        // IE - #1450: sometimes returns 1223 when it should be 204
                                        } else if ( status === 1223 ) {
                                            status = 204;
    Severity: Major
    Found in public/javascripts/jquery-ui/development-bundle/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 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 && 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-ui/development-bundle/jquery-1.7.2.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if ( relativeHierarchySelector && hasParent ) {
                                  context = context.parentNode;
                              }
          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 ) {
                                        oldContext.removeAttribute( "id" );
                                    }
            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 ( ret[r] === ret[n] ) {
                                          ret.splice(n--, 1);
                                          break;
                                      }
              Severity: Major
              Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 45 mins to fix

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

                        ATTR: function( match, curLoop, inplace, result, not, 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

                                          if ( name.indexOf( "data-" ) === 0 ) {
                                              name = jQuery.camelCase( name.substring(5) );
                  
                                              dataAttr( elem, name, data[ name ] );
                                          }
                  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 ( flags.unique ) {
                                                        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 ( name in thisCache ) {
                                                  name = [ name ];
                                              } else {
                                                  name = name.split( " " );
                                              }
                      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 ( firing ) {
                                                            if ( i <= firingLength ) {
                                                                firingLength--;
                                                                if ( i <= firingIndex ) {
                                                                    firingIndex--;
                        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 ( ret === false ) {
                                                      event.preventDefault();
                                                      event.stopPropagation();
                                                  }
                          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 ( safeChildNodes.length > 0 ) {
                                                        remove = safeChildNodes[ safeChildNodes.length - 1 ];
                            
                                                        if ( remove && remove.parentNode ) {
                                                            remove.parentNode.removeChild( remove );
                            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 ( !match ) {
                                                      anyFound = found = true;
                              
                                                  } else if ( match === true ) {
                                                      continue;
                              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

                                                    for ( i = 0; (item = curLoop[i]) != null; i++ ) {
                                                        if ( item ) {
                                                            found = filter( item, match, i, curLoop );
                                                            pass = not ^ found;
                                
                                
                                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

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

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

                                      def build
                                        @project = Project.find(params[:id])
                                        render :text => "Project #{params[:id].inspect} not found", :status => 404 and return unless @project
                                    
                                        @project.request_build rescue nil
                                    Severity: Minor
                                    Found in app/controllers/projects_controller.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

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

                                          def parse(lines)
                                            lines = lines.lines if lines.is_a?(String) && lines.respond_to?(:lines)
                                            
                                            directories = {}
                                            current_dir = nil
                                    Severity: Minor
                                    Found in lib/source_control/subversion/propget_parser.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

                                                            htmlesc( line, :NoQuotes ) unless used_offtags['notextile']
                                    Severity: Major
                                    Found in lib/redcloth.rb - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language