sleepepi/sleepportal

View on GitHub

Showing 436 of 436 total issues

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

    add: function (parent) {

        var renderer = this.renderer,
            parentWrapper = parent || renderer,
            parentNode = parentWrapper.element || renderer.box,
Severity: Minor
Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

    Function drawLegendSymbol has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        drawLegendSymbol: function (legend) {
            
            var options = this.options,
                markerOptions = options.marker,
                radius,
    Severity: Minor
    Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

      Function verifyDataLabelOverflow has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          verifyDataLabelOverflow: function (overflow) {
              
              var center = this.center,
                  options = this.options,
                  centerOption = options.center,
      Severity: Minor
      Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

        Function positionDropdown has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                positionDropdown: function() {
                    var offset = this.container.offset(),
                        height = this.container.outerHeight(),
                        width = this.container.outerWidth(),
                        dropHeight = this.dropdown.outerHeight(),
        Severity: Minor
        Found in app/assets/javascripts/external/select2.js - About 1 hr to fix

          Method graph_values has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def graph_values(current_user)
              categories = []
              mapping_values = []
          
              if ['numeric', 'integer', 'date', 'choices'].include?(self.variable_type)
          Severity: Minor
          Found in app/models/variable.rb - About 1 hr to fix

            Function getBBox has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                getBBox: function () {
                    var wrapper = this,
                        bBox = wrapper.bBox,
                        renderer = wrapper.renderer,
                        width,
            Severity: Minor
            Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

              Function getExtremes has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  getExtremes: function () {
                      var xAxis = this.xAxis,
                          yAxis = this.yAxis,
                          xData = this.processedXData,
                          yData = this.stackedYData || this.processedYData,
              Severity: Minor
              Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

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

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

                  Function getSegmentPath has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      getSegmentPath: function (segment) {        
                          var series = this,
                              segmentPath = [],
                              step = series.options.step;
                              
                  Severity: Minor
                  Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                    Function clipRect has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        clipRect: function (x, y, width, height) {
                    
                            // create a dummy element
                            var clipRect = this.createElement(),
                                isObj = isObject(x);
                    Severity: Minor
                    Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                      Function local has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function local(options) {
                              var data = options, // data elements
                                  dataText,
                                  text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
                      
                      
                      Severity: Minor
                      Found in app/assets/javascripts/external/select2.js - About 1 hr to fix

                        Method set_values has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def set_values
                            all_sources.each do |source|
                              wrapper = Aqueduct::Builder.wrapper(source, @current_user)
                        
                              mappings_for_select_clause = []
                        Severity: Minor
                        Found in app/models/master_resolver.rb - About 1 hr to fix

                          Function scanValues has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  scanValues: function () {
                                      var values = this.values,
                                          valcount = values.length,
                                          xvalues = this.xvalues,
                                          yvalues = this.yvalues,
                          Severity: Minor
                          Found in app/assets/javascripts/external/jquery.sparkline.js - About 1 hr to fix

                            Function translate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                translate: function (val, backwards, cvsCoord, old, handleLog, pointPlacement) {
                                    var axis = this,
                                        axisLength = axis.len,
                                        sign = 1,
                                        cvsOffset = 0,
                            Severity: Minor
                            Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                              Function alignDataLabel has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  alignDataLabel: function (point, dataLabel, options, alignTo, isNew) {
                                      var chart = this.chart,
                                          inverted = chart.inverted,
                                          plotX = pick(point.plotX, -999),
                                          plotY = pick(point.plotY, -999),
                              Severity: Minor
                              Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                                Function render has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        render: function (fieldset, lookups, options) {
                                            var self = this,
                                                fields = fieldset,
                                                match, token, lookupkey, fieldvalue, prec;
                                            return this.format.replace(this.fre, function () {
                                Severity: Minor
                                Found in app/assets/javascripts/external/jquery.sparkline.js - About 1 hr to fix

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                      var token_list = $("<ul />")
                                          .addClass(settings.classes.tokenList)
                                          .click(function (event) {
                                              var li = $(event.target).closest("li");
                                              if(li && li.get(0) && $.data(li.get(0), "tokeninput")) {
                                  Severity: Major
                                  Found in app/assets/javascripts/external/jquery.tokeninput.js and 1 other location - About 1 hr to fix
                                  app/assets/javascripts/external/jquery.tokeninput.js on lines 279..306

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 65.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Function setVisible has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      setVisible: function (vis, redraw) {
                                          var series = this,
                                              chart = series.chart,
                                              legendItem = series.legendItem,
                                              showOrHide,
                                  Severity: Minor
                                  Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

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

                                        destroy: function () {
                                            var wrapper = this,
                                                element = wrapper.element || {},
                                                shadows = wrapper.shadows,
                                                parentToClean = wrapper.renderer.isSVG && element.nodeName === 'SPAN' && wrapper.parentGroup,
                                    Severity: Minor
                                    Found in app/assets/javascripts/external/highcharts-3.0.7.src.js - About 1 hr to fix

                                      Function populate_dropdown has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function populate_dropdown (query, results) {
                                              if(results && results.length) {
                                                  dropdown.empty();
                                                  var dropdown_ul = $("<ul>")
                                                      .appendTo(dropdown)
                                      Severity: Minor
                                      Found in app/assets/javascripts/external/jquery.tokeninput.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language