ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

Function _tabify has 229 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _tabify: function( init ) {
        var self = this,
            o = this.options,
            fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash

Severity: Major
Found in public/javascripts/jquery-ui/development-bundle/ui/jquery.ui.tabs.js - About 1 day to fix

    Function _tabify has 229 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _tabify: function( init ) {
            var self = this,
                o = this.options,
                fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
    
    

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

      /*!
       * jQuery UI Tabs 1.8.21
       *
       * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
       * Dual licensed under the MIT or GPL Version 2 licenses.
      Severity: Major
      Found in public/javascripts/jquery-ui/development-bundle/ui/jquery.ui.tabs.js - About 1 day to fix

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

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

          File project.rb has 514 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          class Project
            attr_reader :name, :plugins, :build_command, :rake_task, :config_tracker, :path, :settings, :config_file_content, :error_message
            attr_accessor :source_control, :scheduler, :use_bundler, :gemfile, :bundler_args
          
            alias_method :id, :name
          Severity: Major
          Found in app/models/project.rb - About 1 day to fix

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

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

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

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

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

                jQuery.support = (function() {
                
                    var support,
                        all,
                        a,
                Severity: Major
                Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 6 hrs to fix

                  Class Build has 49 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  class Build
                    include CommandLine
                  
                    class ConfigError < StandardError; end
                  
                  
                  Severity: Minor
                  Found in app/models/build.rb - About 6 hrs to fix

                    Function _generateHTML has 167 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _generateHTML: function(inst) {
                            var today = new Date();
                            today = this._daylightSavingAdjust(
                                new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
                            var isRTL = this._get(inst, 'isRTL');

                      Function _generateHTML has 167 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _generateHTML: function(inst) {
                              var today = new Date();
                              today = this._daylightSavingAdjust(
                                  new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
                              var isRTL = this._get(inst, 'isRTL');

                        Method block_textile_lists has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def block_textile_lists( text ) 
                                text.gsub!( LISTS_RE ) do |match|
                                    lines = match.split( /\n/ )
                                    last_line = -1
                                    depth = []
                        Severity: Minor
                        Found in lib/redcloth.rb - About 6 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

                        Method rip_offtags has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def rip_offtags( text )
                                if text =~ /<.*>/
                                    ## strip and encode <pre> content
                                    codepre, used_offtags = 0, {}
                                    text.gsub!( OFFTAG_MATCH ) do |line|
                        Severity: Minor
                        Found in lib/redcloth.rb - About 6 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 Callbacks has 150 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        jQuery.Callbacks = function( flags ) {
                        
                            // Convert flags from String-formatted to Object-formatted
                            // (we check in cache first)
                            flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
                        Severity: Major
                        Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 6 hrs to fix

                          Class RedCloth has 44 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          class RedCloth < String
                          
                              VERSION = '3.0.4'
                              DEFAULT_RULES = [:textile, :markdown]
                          
                          
                          Severity: Minor
                          Found in lib/redcloth.rb - About 6 hrs to fix

                            Function jsDump has 148 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            QUnit.jsDump = (function() {
                                function quote( str ) {
                                    return '"' + str.toString().replace(/"/g, '\\"') + '"';
                                };
                                function literal( o ) {
                            Severity: Major
                            Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 5 hrs to fix

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

                                  _create: function() {
                                      var self = this,
                                          doc = this.element[ 0 ].ownerDocument,
                                          suppressKeyPress;
                                      this.isMultiLine = this.element.is( "textarea" );

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

                                    _create: function() {
                                        var self = this,
                                            doc = this.element[ 0 ].ownerDocument,
                                            suppressKeyPress;
                                        this.isMultiLine = this.element.is( "textarea" );

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

                                      _create: function() {
                                          var self = this,
                                              o = this.options,
                                              existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
                                              handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",

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

                                        _create: function() {
                                            var self = this,
                                                o = this.options,
                                                existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
                                                handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language