ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

Function tablecloth has 141 lines of code (exceeds 25 allowed). Consider refactoring.
Open

this.tablecloth = function(){

    
    // CONFIG 
    
Severity: Major
Found in lib/builder_plugins/release_tag_logger/tablecloth/tablecloth.js - About 5 hrs to fix

    Function tablecloth has 141 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    this.tablecloth = function(){
        
        // CONFIG 
        
        // if set to true then mouseover a table cell will highlight entire column (except sibling headings)
    Severity: Major
    Found in lib/builder_plugins/sequential_build_logger/tablecloth/tablecloth.js - About 5 hrs to fix

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

          _create: function() {
              this.element.closest( "form" )
                  .unbind( "reset.button" )
                  .bind( "reset.button", formResetHandler );
      
      

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

            _create: function() {
                this.element.closest( "form" )
                    .unbind( "reset.button" )
                    .bind( "reset.button", formResetHandler );
        
        

          Function support has 131 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          jQuery.support = (function() {
          
              var div = document.createElement( "div" ),
                  documentElement = document.documentElement,
                  all,
          Severity: Major
          Found in public/javascripts/jquery-1.6.1.js - About 5 hrs to fix

            Function parseDate has 131 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                parseDate: function (format, value, settings) {
                    if (format == null || value == null)
                        throw 'Invalid arguments';
                    value = (typeof value == 'object' ? value.toString() : value + '');
                    if (value == '')

              Function parseDate has 131 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  parseDate: function (format, value, settings) {
                      if (format == null || value == null)
                          throw 'Invalid arguments';
                      value = (typeof value == 'object' ? value.toString() : value + '');
                      if (value == '')

                Consider simplifying this complex logical expression.
                Open

                        if ( event.pageX == null && event.clientX != null ) {
                            var eventDocument = event.target.ownerDocument || document,
                                doc = eventDocument.documentElement,
                                body = eventDocument.body;
                
                
                Severity: Critical
                Found in public/javascripts/jquery-1.6.1.js - About 5 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if ( event.pageX == null && original.clientX != null ) {
                                  eventDoc = event.target.ownerDocument || document;
                                  doc = eventDoc.documentElement;
                                  body = eventDoc.body;
                  
                  
                  Severity: Critical
                  Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 5 hrs to fix

                    Function equiv has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    QUnit.equiv = function () {
                    
                        var innerEquiv; // the real equiv function
                        var callers = []; // stack to decide between skip/abort functions
                        var parents = []; // stack to avoiding loops from circular referencing
                    Severity: Major
                    Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 4 hrs to fix

                      Function position has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      $.fn.position = function( options ) {
                          if ( !options || !options.of ) {
                              return _position.apply( this, arguments );
                          }
                      
                      

                        Function position has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        $.fn.position = function( options ) {
                            if ( !options || !options.of ) {
                                return _position.apply( this, arguments );
                            }
                        
                        

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

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

                            Function array_to_json has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function array_to_json( $array ){
                            
                                if( !is_array( $array ) ){
                                    return false;
                                }

                            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 blocks has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def blocks( text, deep_code = false )
                                    text.replace( text.split( BLOCKS_GROUP_RE ).collect do |blk|
                                        plain = blk !~ /\A[#*> ]/
                            
                                        # skip blocks that are complex HTML
                            Severity: Minor
                            Found in lib/redcloth.rb - About 4 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 Sizzle has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var Sizzle = function( selector, context, results, seed ) {
                                results = results || [];
                                context = context || document;
                            
                                var origContext = context;
                            Severity: Major
                            Found in public/javascripts/jquery-1.6.1.js - About 4 hrs to fix

                              Function Sizzle has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var Sizzle = function( selector, context, results, seed ) {
                                  results = results || [];
                                  context = context || document;
                              
                                  var origContext = context;
                              Severity: Major
                              Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 4 hrs to fix

                                Function diff has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                QUnit.diff = (function() {
                                    function diff(o, n){
                                        var ns = new Object();
                                        var os = new Object();
                                
                                
                                Severity: Major
                                Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 4 hrs to fix

                                  Method clean_html has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def clean_html( text, tags = BASIC_TAGS )
                                          text.gsub!( /<!\[CDATA\[/, '' )
                                          text.gsub!( /<(\/*)(\w+)([^>]*)>/ ) do
                                              raw = $~
                                              tag = raw[2].downcase
                                  Severity: Minor
                                  Found in lib/redcloth.rb - About 4 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

                                  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;
                                              }
                                  Severity: Critical
                                  Found in public/javascripts/jquery-ui/development-bundle/ui/jquery.ui.draggable.js - About 4 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language