sleepepi/sleepportal

View on GitHub

Showing 332 of 436 total issues

Function adjustForMinRange has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    adjustForMinRange: function () {
        var axis = this,
            options = axis.options,
            min = axis.min,
            max = axis.max,
Severity: Major
Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 2 hrs to fix

    Function getColumnMetrics has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        getColumnMetrics: function () {
    
            var series = this,
                options = series.options,
                xAxis = series.xAxis,
    Severity: Major
    Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 2 hrs to fix

      Function setChartSize has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          setChartSize: function (skipAxes) {
              var chart = this,
                  inverted = chart.inverted,
                  renderer = chart.renderer,
                  chartWidth = chart.chartWidth,
      Severity: Minor
      Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

        Function setAxisTranslation has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            setAxisTranslation: function (saveOld) {
                var axis = this,
                    range = axis.max - axis.min,
                    pointRange = 0,
                    closestPointRange,
        Severity: Minor
        Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

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

              init: function (elem, fromD, toD) {
                  fromD = fromD || '';
                  var shift = elem.shift,
                      bezier = fromD.indexOf('C') > -1,
                      numParams = bezier ? 7 : 3,
          Severity: Minor
          Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

            Function runPointActions has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                runPointActions: function (e) {
                    var pointer = this,
                        chart = pointer.chart,
                        series = chart.series,
                        tooltip = chart.tooltip,
            Severity: Minor
            Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

              Function shadow has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  shadow: function (shadowOptions, group, cutOff) {
                      var shadows = [],
                          i,
                          element = this.element,
                          renderer = this.renderer,
              Severity: Minor
              Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                Method graph_values_short has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                Open

                  def graph_values_short(current_user)
                    values = self.all_values_for_column(current_user)[:values]
                
                    case self.variable.variable_type when 'integer'
                      values = values.select{|v| not v.blank?}.collect{|num_string| num_string.to_i} # Ignore null and blank values!
                Severity: Minor
                Found in app/models/mapping.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 scroll has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    scroll: function (scrollBy, animation) {
                        var pageCount = this.pageCount,
                            currentPage = this.currentPage + scrollBy,
                            clipHeight = this.clipHeight,
                            navOptions = this.options.navigation,
                Severity: Minor
                Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                  Function destroy has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      destroy: function () {
                          var series = this,
                              chart = series.chart,
                              issue134 = /AppleWebKit\/533/.test(userAgent),
                              destroy,
                  Severity: Minor
                  Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                    Function setSize has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        setSize: function (width, height, animation) {
                            var chart = this,
                                chartWidth,
                                chartHeight,
                                fireEndResize;
                    Severity: Minor
                    Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                      Function processData has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          processData: function (force) {
                              var series = this,
                                  processedXData = series.xData, // copied during slice operation below
                                  processedYData = series.yData,
                                  dataLength = processedXData.length,
                      Severity: Minor
                      Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                        Function generatePoints has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            generatePoints: function () {
                                var series = this,
                                    options = series.options,
                                    dataOptions = options.data,
                                    data = series.data,
                        Severity: Minor
                        Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                          Function setTooltipPoints has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              setTooltipPoints: function (renew) {
                                  var series = this,
                                      points = [],
                                      pointsLength,
                                      low,
                          Severity: Minor
                          Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                            Function arc has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    arc: function (x, y, w, h, options) {
                                        var start = options.start,
                                            end = options.end,
                                            radius = options.r || w || h,
                                            innerRadius = options.innerR,
                            Severity: Minor
                            Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                              Function setScale has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  setScale: function () {
                                      var axis = this,
                                          stacks = axis.stacks,
                                          type,
                                          i,
                              Severity: Minor
                              Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

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

                                            wrapper.add = function (svgGroupWrapper) {
                                
                                                var htmlGroup,
                                                    container = renderer.box.parentNode,
                                                    parentGroup,
                                Severity: Minor
                                Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                                  Function drop has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      drop: function (e) {
                                          var chart = this.chart,
                                              hasPinched = this.hasPinched;
                                  
                                          if (this.selectionMarker) {
                                  Severity: Minor
                                  Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                                    Function justifyDataLabel has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        justifyDataLabel: function (dataLabel, options, alignAttr, bBox, alignTo, isNew) {
                                            var chart = this.chart,
                                                align = options.align,
                                                verticalAlign = options.verticalAlign,
                                                off,
                                    Severity: Minor
                                    Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                                      Function animate has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          animate: function (init) {
                                              var series = this,
                                                  chart = series.chart,
                                                  renderer = chart.renderer,
                                                  clipRect,
                                      Severity: Minor
                                      Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language