ianheggie/cruisecontrol.rb

View on GitHub

Showing 679 of 1,357 total issues

Function find has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    find: function( selector ) {
        var self = this,
            i, l;

        if ( typeof selector !== "string" ) {
Severity: Minor
Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 1 hr to fix

    Function show has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        show: function( speed, easing, callback ) {
            var elem, display;
    
            if ( speed || speed === 0 ) {
                return this.animate( genFx("show", 3), speed, easing, callback );
    Severity: Minor
    Found in public/javascripts/jquery-ui/development-bundle/jquery-1.7.2.js - About 1 hr to fix

      Method add_build has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def add_build(build)
          begin
            current_dir = Rails.root.join('lib', 'builder_plugins', 'sequential_build_logger').to_s
            #Log file and html file in project path
            project_build_sequence_log = "#{build.project.path}/build_sequence.log"
      Severity: Minor
      Found in lib/builder_plugins/sequential_build_logger/init.rb - About 1 hr to fix

        Method warning_chart has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

          def warning_chart
            clean_data
        
            CSV.foreach(@csv_file) do |row|
              if row[0] == "Warning Type"
        Severity: Minor
        Found in lib/brakeman_charts.rb - About 1 hr 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 display_build_time has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

          def display_build_time
            build_time_text = remove_leading_zero I18n.l(@build.time, :format => :verbose)
        
            if @build.incomplete?
              if @build.latest?
        Severity: Minor
        Found in app/helpers/builds_helper.rb - About 1 hr 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 kill_all_builders has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

          def kill_all_builders
            killed = []
        
            @projects = Project.all
            @projects.each do |project|
        Severity: Minor
        Found in app/controllers/projects_controller.rb - About 1 hr 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 notify_of_build_outcome has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

          def notify_of_build_outcome(build, fixed = nil)
            if @subscribers.empty?
              CruiseControl::Log.debug("Jabber notifier: no subscribers registered")
            else
              status = if build.failed?
        Severity: Minor
        Found in lib/builder_plugins/jabber_notifier.rb - About 1 hr 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 show has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            show: function( speed, easing, callback ) {
                var elem, display;
        
                if ( speed || speed === 0 ) {
                    return this.animate( genFx("show", 3), speed, easing, callback);
        Severity: Minor
        Found in public/javascripts/jquery-1.6.1.js - About 1 hr to fix

          Function html has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              html: function( value ) {
                  if ( value === undefined ) {
                      return this[0] && this[0].nodeType === 1 ?
                          this[0].innerHTML.replace(rinlinejQuery, "") :
                          null;
          Severity: Minor
          Found in public/javascripts/jquery-1.6.1.js - About 1 hr to fix

            Function addClass has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                addClass: function( value ) {
                    if ( jQuery.isFunction( value ) ) {
                        return this.each(function(i) {
                            var self = jQuery(this);
                            self.addClass( value.call(this, i, self.attr("class") || "") );
            Severity: Minor
            Found in public/javascripts/jquery-1.6.1.js - About 1 hr to fix

              Function custom has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  custom: function( from, to, unit ) {
                      var self = this,
                          fx = jQuery.fx,
                          raf;
              
              
              Severity: Minor
              Found in public/javascripts/jquery-1.6.1.js - About 1 hr to fix

                Function shake has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.effects.shake = function(o) {
                
                    return this.queue(function() {
                
                        // Create element

                  Function type has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      jQuery.fn[ type ] = function( size ) {
                          // Get window width or height
                          var elem = this[0];
                          if ( !elem ) {
                              return size == null ? null : this;
                  Severity: Minor
                  Found in public/javascripts/jquery-1.6.1.js - About 1 hr to fix

                    Function transfer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.effects.transfer = function(o) {
                        return this.queue(function() {
                            var elem = $(this),
                                target = $(o.options.to),
                                endPosition = target.offset(),

                      Function drag has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          drag: function(draggable, event) {
                      
                              //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
                              if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
                      
                      

                        Function refresh has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            refresh: function() {
                                var isDisabled = this.element.is( ":disabled" );
                                if ( isDisabled !== this.options.disabled ) {
                                    this._setOption( "disabled", isDisabled );
                                }

                          Function drag has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              drag: function(draggable, event) {
                          
                                  //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
                                  if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
                          
                          

                            Function transfer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            $.effects.transfer = function(o) {
                                return this.queue(function() {
                                    var elem = $(this),
                                        target = $(o.options.to),
                                        endPosition = target.offset(),

                              Function shake has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              $.effects.shake = function(o) {
                              
                                  return this.queue(function() {
                              
                                      // Create element

                                Function refresh has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    refresh: function() {
                                        var isDisabled = this.element.is( ":disabled" );
                                        if ( isDisabled !== this.options.disabled ) {
                                            this._setOption( "disabled", isDisabled );
                                        }
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language