ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

Function _mouseStart has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _mouseStart: function(event) {
        var self = this;

        this.opos = [event.pageX, event.pageY];

    Function _mouseStart has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _mouseStart: function(event) {
            var self = this;
    
            this.opos = [event.pageX, event.pageY];
    
    

      Function _clear has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _clear: function(event, noPropagation) {
      
              this.reverting = false;
              // We delay all events that have to be triggered to after the point where the placeholder has been removed and
              // everything else normalized again

        Function _clear has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _clear: function(event, noPropagation) {
        
                this.reverting = false;
                // We delay all events that have to be triggered to after the point where the placeholder has been removed and
                // everything else normalized again

          Function remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              remove: function( elem, types, handler, selector, mappedTypes ) {
          
                  var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
                      t, tns, type, origType, namespaces, origCount,
                      j, events, special, handle, eventType, handleObj;
          Severity: Major
          Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

            File jquery.ui.position.js has 251 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*!
             * jQuery UI Position 1.8.21
             *
             * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
             * Dual licensed under the MIT or GPL Version 2 licenses.

              Consider simplifying this complex logical expression.
              Open

                      if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
                              var c = $(o.containment);
                          var ce = c[0]; if(!ce) return;
                          var co = c.offset();
                          var over = ($(ce).css("overflow") != 'hidden');
              Severity: Critical
              Found in public/javascripts/jquery-ui/development-bundle/ui/jquery.ui.draggable.js - About 2 hrs to fix

                Function bounce has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.effects.bounce = function(o) {
                
                    return this.queue(function() {
                
                        // Create element

                  Consider simplifying this complex logical expression.
                  Open

                          if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
                                  var c = $(o.containment);
                              var ce = c[0]; if(!ce) return;
                              var co = c.offset();
                              var over = ($(ce).css("overflow") != 'hidden');

                    Function bounce has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.effects.bounce = function(o) {
                    
                        return this.queue(function() {
                    
                            // Create element

                      Consider simplifying this complex logical expression.
                      Open

                          if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
                              first.charAt(0) === "<" && !rnocache.test( first ) &&
                              (jQuery.support.checkClone || !rchecked.test( first )) &&
                              (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
                      
                      
                      Severity: Critical
                      Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                        if ( ( mappedTypes || origType === handleObj.origType ) &&
                                             ( !handler || handler.guid === handleObj.guid ) &&
                                             ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
                                             ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                            eventType.splice( j--, 1 );
                        Severity: Critical
                        Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

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

                              step: function( gotoEnd ) {
                                  var p, n, complete,
                                      t = fxNow || createFxNow(),
                                      done = true,
                                      elem = this.elem,
                          Severity: Minor
                          Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

                            Function _determineDate has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _determineDate: function(inst, date, defaultDate) {
                                    var offsetNumeric = function(offset) {
                                        var date = new Date();
                                        date.setDate(date.getDate() + offset);
                                        return date;

                              Function _determineDate has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _determineDate: function(inst, date, defaultDate) {
                                      var offsetNumeric = function(offset) {
                                          var date = new Date();
                                          date.setDate(date.getDate() + offset);
                                          return date;

                                Function CHILD has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        CHILD: function( elem, match ) {
                                            var first, last,
                                                doneName, parent, cache,
                                                count, diff,
                                                type = match[1],
                                Severity: Minor
                                Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 1 hr to fix

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

                                      data: function( key, value ) {
                                          var parts, part, attr, name, l,
                                              elem = this[0],
                                              i = 0,
                                              data = null;
                                  Severity: Minor
                                  Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 1 hr to fix

                                    Method build_if_necessary has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                      def build_if_necessary
                                        begin
                                          if build_necessary?(reasons = [])
                                            remove_build_requested_flag_file if build_requested?
                                            return build(source_control.latest_revision, reasons)
                                    Severity: Minor
                                    Found in app/models/project.rb - About 1 hr 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 15 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                          def parse(log)
                                            @log = log
                                            revisions = []
                                            revision = nil
                                            in_gpg_sig = false
                                    Severity: Minor
                                    Found in lib/source_control/git/log_parser.rb - About 1 hr 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 inline_textile_image has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        def inline_textile_image( text ) 
                                            text.gsub!( IMAGE_RE )  do |m|
                                                stln,algn,atts,url,title,href,href_a1,href_a2 = $~[1..8]
                                                atts = pba( atts )
                                                atts = " src=\"#{ url }\"#{ atts }"
                                    Severity: Minor
                                    Found in lib/redcloth.rb - About 1 hr 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language