ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

Function _showDatepicker has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _showDatepicker: function(input) {
        input = input.target || input;
        if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
            input = $('input', input.parentNode)[0];
        if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here

    Function _showDatepicker has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _showDatepicker: function(input) {
            input = input.target || input;
            if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
                input = $('input', input.parentNode)[0];
            if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here

      Function _mouseDrag has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _mouseDrag: function(event) {
              var self = this;
              this.dragged = true;
      
              if (this.options.disabled)

        Function filter has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Sizzle.filter = function( expr, set, inplace, not ) {
            var match, anyFound,
                type, found, item, filter, left,
                i, pass,
                old = expr,
        Severity: Major
        Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

          Function done has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function done( status, nativeStatusText, responses, headers ) {
          
                      // Called once
                      if ( state === 2 ) {
                          return;
          Severity: Major
          Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

            Function filter has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Sizzle.filter = function( expr, set, inplace, not ) {
                var match, anyFound,
                    old = expr,
                    result = [],
                    curLoop = set,
            Severity: Major
            Found in public/javascripts/jquery-1.6.1.js - About 2 hrs to fix

              Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function done( status, statusText, responses, headers ) {
              
                          // Called once
                          if ( state === 2 ) {
                              return;
              Severity: Major
              Found in public/javascripts/jquery-1.6.1.js - About 2 hrs to fix

                Function _doKeyDown has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _doKeyDown: function(event) {
                        var inst = $.datepicker._getInst(event.target);
                        var handled = true;
                        var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
                        inst._keyEvent = true;

                  Function _doKeyDown has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _doKeyDown: function(event) {
                          var inst = $.datepicker._getInst(event.target);
                          var handled = true;
                          var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
                          inst._keyEvent = true;

                    Function _clickHandler has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _clickHandler: function( event, target ) {
                            var options = this.options;
                            if ( options.disabled ) {
                                return;
                            }

                      Function _clickHandler has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _clickHandler: function( event, target ) {
                              var options = this.options;
                              if ( options.disabled ) {
                                  return;
                              }

                        Function dispatch has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            dispatch: function( event ) {
                        
                                // Make a writable jQuery.Event from the native event object
                                event = jQuery.event.fix( event || window.event );
                        
                        
                        Severity: Major
                        Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

                          Function init has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              init: function( selector, context, rootjQuery ) {
                                  var match, elem, ret, doc;
                          
                                  // Handle $(""), $(null), or $(undefined)
                                  if ( !selector ) {
                          Severity: Major
                          Found in public/javascripts/jquery-1.6.1.js - About 2 hrs to fix

                            Function init has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                init: function( selector, context, rootjQuery ) {
                                    var match, elem, ret, doc;
                            
                                    // Handle $(""), $(null), or $(undefined)
                                    if ( !selector ) {
                            Severity: Major
                            Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

                              Method notify has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def notify(event, *event_parameters)
                                  unless BuilderPlugin.known_event? event
                                    raise "You attempted to notify the project of the #{event} event, but the plugin architecture does not understand this event. Add a method to BuilderPlugin, and document it."
                                  end
                              
                              
                              Severity: Minor
                              Found in app/models/project.rb - About 2 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 _Deferred has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _Deferred: function() {
                                      var // callbacks list
                                          callbacks = [],
                                          // stored [ context , args ]
                                          fired,
                              Severity: Major
                              Found in public/javascripts/jquery-1.6.1.js - About 2 hrs to fix

                                Function liveHandler has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function liveHandler( event ) {
                                    var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
                                        elems = [],
                                        selectors = [],
                                        events = jQuery._data( this, "events" );
                                Severity: Major
                                Found in public/javascripts/jquery-1.6.1.js - About 2 hrs to fix

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

                                      _mouseStart: function(event, overrideHandle, noActivation) {
                                  
                                          var o = this.options, self = this;
                                          this.currentContainer = this;
                                  
                                  

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

                                        _mouseStart: function(event, overrideHandle, noActivation) {
                                    
                                            var o = this.options, self = this;
                                            this.currentContainer = this;
                                    
                                    

                                      Method glyphs_textile has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def glyphs_textile( text, level = 0 )
                                              if text !~ HASTAG_MATCH
                                                  pgl text
                                                  footnote_ref text
                                              else
                                      Severity: Minor
                                      Found in lib/redcloth.rb - About 2 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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language