backlogs/redmine_backlogs

View on GitHub

Showing 993 of 2,083 total issues

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 assets/javascripts/jquery/jquery.jqplot/jquery.js - About 5 hrs to fix

    Function reInitialize has 125 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            this.reInitialize = function (data, opts) {
                // Plot should be visible and have a height and width.
                // If plot doesn't have height and width for some
                // reason, set it by other means.  Plot must not have
                // a display:none attribute, however.
    Severity: Major
    Found in assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js - About 5 hrs to fix

      Function draw has 122 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.jqplot.PieRenderer.prototype.draw = function (ctx, gd, options, plot) {
              var i;
              var opts = (options != undefined) ? options : {};
              // offset and direction of offset due to legend placement
              var offx = 0;
      Severity: Major
      Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 4 hrs to fix

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

            $.jqplot.DateAxisRenderer.prototype.init = function(options){
                // prop: tickRenderer
                // A class of a rendering engine for creating the ticks labels displayed on the plot, 
                // See <$.jqplot.AxisTickRenderer>.
                // this.tickRenderer = $.jqplot.AxisTickRenderer;

          Class RbStory has 37 methods (exceeds 20 allowed). Consider refactoring.
          Open

          class RbStory < Issue
            unloadable
          
            RELEASE_RELATIONSHIP = %w(auto initial continued added)
          
          
          Severity: Minor
          Found in app/models/rb_story.rb - About 4 hrs to fix

            File rb_story.rb has 366 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            class RbStory < Issue
              unloadable
            
              RELEASE_RELATIONSHIP = %w(auto initial continued added)
            
            
            Severity: Minor
            Found in app/models/rb_story.rb - About 4 hrs to fix

              Function activate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  $.jqplot.ThemeEngine.prototype.activate = function(plot, name) {
                      // sometimes need to redraw whole plot.
                      var redrawPlot = false;
                      if (!name && this.activeTheme && this.activeTheme._name) {
                          name = this.activeTheme._name;
              Severity: Major
              Found in assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js - About 4 hrs to fix

                File backlogs_hooks.rb has 354 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                include RbCommonHelper
                include ContextMenusHelper
                
                module BacklogsPlugin
                  module Hooks
                Severity: Minor
                Found in lib/backlogs_hooks.rb - About 4 hrs to fix

                  Method rebuild has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def self.rebuild(issue)
                      RbJournal.delete_all(:issue_id => issue.id)
                  
                      changes = {}
                      RbJournal::REDMINE_PROPERTIES.each{|prop| changes[prop] = [] }
                  Severity: Minor
                  Found in app/models/rb_stats.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 position has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

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

                        $.jqplot.MeterGaugeRenderer.prototype.init = function(options) {
                            // Group: Properties
                            //
                            // prop: diameter
                            // Outer diameter of the meterGauge, auto computed by default

                      Model has 34 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      RB.Model = RB.Object.create({
                      
                        initialize: function(el){
                          this.$ = RB.$(el);
                          this.el = el;
                      Severity: Minor
                      Found in assets/javascripts/model.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 assets/javascripts/jquery/jquery.jqplot/jquery.js - About 4 hrs to fix

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

                              $.jqplot.DonutRenderer.prototype.draw = function (ctx, gd, options, plot) {
                                  var i;
                                  var opts = (options != undefined) ? options : {};
                                  // offset and direction of offset due to legend placement
                                  var offx = 0;

                            File jqplot.pyramidGridRenderer.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /**
                             * jqPlot
                             * Pure JavaScript plotting plugin using jQuery
                             *
                             * Version: 1.0.0

                              File jqplot.pyramidRenderer.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /**
                               * jqPlot
                               * Pure JavaScript plotting plugin using jQuery
                               *
                               * Version: 1.0.0

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

                                      def add_backlogs_fields
                                        story_trackers = RbStory.trackers
                                
                                        case params[:format]
                                          when 'xml'
                                Severity: Minor
                                Found in lib/backlogs_issues_controller_patch.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 pack has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    $.jqplot.MekkoLegendRenderer.prototype.pack = function(offsets) {
                                        if (this.show) {
                                            // fake a grid for positioning
                                            var grid = {_top:offsets.top, _left:offsets.left, _right:offsets.right, _bottom:this._plotDimensions.height - offsets.bottom};        
                                            if (this.placement == 'insideGrid') {

                                  Function SearchResults has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function SearchResults(name, mode)
                                      {
                                      /*
                                          var: mode
                                          The mode the search is going to work in, such as "HTML" or "FramedHTML".
                                  Severity: Major
                                  Found in assets/javascripts/jquery/jquery.jqplot/docs/javascript/main.js - About 4 hrs to fix

                                    Method initialize has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        def initialize(project)
                                          @project = project
                                          @statistics = {:succeeded => [], :failed => [], :values => {}}
                                    
                                          @active_sprint = @project.active_sprint
                                    Severity: Minor
                                    Found in lib/backlogs_project_patch.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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language