ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

Consider simplifying this complex logical expression.
Open

            if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
                if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
                inst.snapElements[i].snapping = false;
                continue;
            }

    Function _create has 97 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _create: function() {
            this.originalTitle = this.element.attr('title');
            // #5742 - .attr() might return a DOMElement
            if ( typeof this.originalTitle !== "string" ) {
                this.originalTitle = "";

      Function _create has 97 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _create: function() {
              this.originalTitle = this.element.attr('title');
              // #5742 - .attr() might return a DOMElement
              if ( typeof this.originalTitle !== "string" ) {
                  this.originalTitle = "";

        Function clean has 95 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            clean: function( elems, context, fragment, scripts ) {
                var checkScriptType, script, j,
                        ret = [];
        
                context = context || document;
        Severity: Major
        Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 3 hrs to fix

          Function trigger has 94 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              trigger: function( event, data, elem, onlyHandlers ) {
                  // Don't do events on text and comment nodes
                  if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
                      return;
                  }
          Severity: Major
          Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 3 hrs to fix

            Function animate has 94 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                animate: function( prop, speed, easing, callback ) {
                    var optall = jQuery.speed( speed, easing, callback );
            
                    if ( jQuery.isEmptyObject( prop ) ) {
                        return this.each( optall.complete, [ false ] );
            Severity: Major
            Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 3 hrs to fix

              Method block_textile_table has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
              Open

                  def block_textile_table( text ) 
                      text.gsub!( TABLE_RE ) do |matches|
              
                          tatts, fullrow = $~[1..2]
                          tatts = pba( tatts, 'table' )
              Severity: Minor
              Found in lib/redcloth.rb - About 3 hrs 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 _create has 93 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _create: function() {
              
                      var self = this, o = this.options;
                      this.element.addClass("ui-resizable");
              
              

                Function _create has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _create: function() {
                
                        var self = this, o = this.options;
                        this.element.addClass("ui-resizable");
                
                

                  Method pba has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def pba( text_in, element = "" )
                          
                          return '' unless text_in
                  
                          style = []
                  Severity: Minor
                  Found in lib/redcloth.rb - About 3 hrs 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 _create has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _create: function() {
                          var self = this,
                              options = self.options;
                  
                          self.running = 0;

                    Function _create has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _create: function() {
                            var self = this,
                                options = self.options;
                    
                            self.running = 0;

                      Function send has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      send: function( headers, complete ) {
                      
                                          // Get a new xhr
                                          var xhr = s.xhr(),
                                              handle,
                      Severity: Major
                      Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 3 hrs to fix

                        Function send has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                        send: function( headers, complete ) {
                        
                                            // Get a new xhr
                                            var xhr = s.xhr(),
                                                handle,
                        Severity: Major
                        Found in public/javascripts/jquery-1.6.1.js - About 3 hrs to fix

                          Function callbacks has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              var callbacks = function () {
                          
                                  // for string, boolean, number and null
                                  function useStrictEquality(b, a) {
                                      if (b instanceof a.constructor || a instanceof b.constructor) {
                          Severity: Major
                          Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 3 hrs to fix

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

                                remove: function( elem, types, handler, pos ) {
                                    // don't do events on text and comment nodes
                                    if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
                                        return;
                                    }
                            Severity: Major
                            Found in public/javascripts/jquery-1.6.1.js - About 3 hrs to fix

                              Function doAnimation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function doAnimation() {
                                          // XXX 'this' does not always have a nodeName when running the
                                          // test suite
                              
                                          if ( optall.queue === false ) {
                              Severity: Major
                              Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 3 hrs to fix

                                Function _toggle has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _toggle: function( toShow, toHide, data, clickedIsActive, down ) {
                                        var self = this,
                                            options = self.options;
                                
                                        self.toShow = toShow;

                                  Function _toggle has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      _toggle: function( toShow, toHide, data, clickedIsActive, down ) {
                                          var self = this,
                                              options = self.options;
                                  
                                          self.toShow = toShow;

                                    Function size has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    $.effects.size = function(o) {
                                    
                                        return this.queue(function() {
                                    
                                            // Create element
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language