ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

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

$.effects.size = function(o) {

    return this.queue(function() {

        // Create element

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

        trigger: function( event, data, elem, onlyHandlers ) {
            // Event object or event type
            var type = event.type || event,
                namespaces = [],
                exclusive;
    Severity: Major
    Found in public/javascripts/jquery-1.6.1.js - About 3 hrs to fix

      Function animate has 80 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-1.6.1.js - About 3 hrs to fix

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

            clean: function( elems, context, fragment, scripts ) {
                var checkScriptType;
        
                context = context || document;
        
        
        Severity: Major
        Found in public/javascripts/jquery-1.6.1.js - About 3 hrs to fix

          Function finish has 78 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              finish: function() {
                  if ( this.expected && this.expected != this.assertions.length ) {
                      QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" );
                  }
          
          
          Severity: Major
          Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 3 hrs to fix

            Method artifact has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

              def artifact
                render :text => 'Project not specified', :status => 404 and return unless params[:project]
                render :text => 'Build not specified', :status => 404 and return unless params[:build]
                render :text => 'Path not specified', :status => 404 and return unless params[:path]
            
            
            Severity: Minor
            Found in app/controllers/builds_controller.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 Deferred has 77 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Deferred: function( func ) {
                    var doneList = jQuery.Callbacks( "once memory" ),
                        failList = jQuery.Callbacks( "once memory" ),
                        progressList = jQuery.Callbacks( "memory" ),
                        state = "pending",
            Severity: Major
            Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 3 hrs to fix

              Consider simplifying this complex logical expression.
              Open

              if ( "getBoundingClientRect" in document.documentElement ) {
                  jQuery.fn.offset = function( options ) {
                      var elem = this[0], box;
              
                      if ( options ) {
              Severity: Critical
              Found in public/javascripts/jquery-1.6.1.js - About 3 hrs to fix

                Function Datepicker has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function Datepicker() {
                    this.debug = false; // Change this to true to start debugging
                    this._curInst = null; // The current instance in use
                    this._keyEvent = false; // If the last event was a key event
                    this._disabledInputs = []; // List of date picker inputs that have been disabled

                  Function Datepicker has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Datepicker() {
                      this.debug = false; // Change this to true to start debugging
                      this._curInst = null; // The current instance in use
                      this._keyEvent = false; // If the last event was a key event
                      this._disabledInputs = []; // List of date picker inputs that have been disabled

                    Consider simplifying this complex logical expression.
                    Open

                    if ( "getBoundingClientRect" in document.documentElement ) {
                        getOffset = function( elem, doc, docElem, box ) {
                            try {
                                box = elem.getBoundingClientRect();
                            } catch(e) {}
                    Severity: Critical
                    Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 3 hrs to fix

                      Function add has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          add: function( elem, types, handler, data ) {
                              if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
                                  return;
                              }
                      
                      
                      Severity: Major
                      Found in public/javascripts/jquery-1.6.1.js - About 2 hrs to fix

                        Function CSVToTable has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            $.fn.CSVToTable = function(csvFile, options) {
                                var defaults = {
                                    tableClass: "CSVTable",
                                    theadClass: "",
                                    thClass: "",

                          Function add has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              add: function( elem, types, handler, data, selector ) {
                          
                                  var elemData, eventHandle, events,
                                      t, tns, type, namespaces, handleObj,
                                      handleObjIn, quick, handlers, special;
                          Severity: Major
                          Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 2 hrs to fix

                            Function slide has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    slide: function( options, additions ) {
                                        options = $.extend({
                                            easing: "swing",
                                            duration: 300
                                        }, options, additions );

                              Function formatDate has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  formatDate: function (format, date, settings) {
                                      if (!date)
                                          return '';
                                      var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
                                      var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;

                                Function slide has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        slide: function( options, additions ) {
                                            options = $.extend({
                                                easing: "swing",
                                                duration: 300
                                            }, options, additions );

                                  Function formatDate has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      formatDate: function (format, date, settings) {
                                          if (!date)
                                              return '';
                                          var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
                                          var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;

                                    Function cookie has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    jQuery.cookie = function (key, value, options) {
                                    
                                        // key and value given, set cookie...
                                        if (arguments.length > 1 && (value === null || typeof value !== "object")) {
                                            options = jQuery.extend({}, options);

                                    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 _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
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language