FanaHOVA/blazer

View on GitHub

Showing 544 of 841 total issues

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

function defaultPrefilter( elem, props, opts ) {
  /* jshint validthis: true */
  var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
    anim = this,
    orig = {},
Severity: Major
Found in app/assets/javascripts/blazer/jquery.js - About 4 hrs to fix

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

            draw: function() {
                var me = this;
                var opts = me.options;
                var labelOpts = opts.labels;
                var globalDefault = Chart.defaults.global,
    Severity: Major
    Found in app/assets/javascripts/blazer/Chart.js - About 4 hrs to fix

      Function 34 has 99 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{}],34:[function(require,module,exports){
      'use strict';
      
      module.exports = function(Chart) {
      
      
      Severity: Major
      Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

        Function drawPoint has 98 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            helpers.drawPoint = function(ctx, pointStyle, radius, x, y) {
                var type, edgeLength, xOffset, yOffset, height, size;
        
                if (typeof pointStyle === 'object') {
                    type = pointStyle.toString();
        Severity: Major
        Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

          Function 21 has 98 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{}],21:[function(require,module,exports){
          /* global window: false */
          'use strict';
          
          module.exports = function(Chart) {
          Severity: Major
          Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

            Function determineDataLimits has 98 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    determineDataLimits: function() {
                        var me = this;
                        var opts = me.options;
                        var tickOpts = opts.ticks;
                        var chart = me.chart;
            Severity: Major
            Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

              Method run_command has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
              Open

                  def run_command(statement)
                    @statement = statement
                    data_source = params[:data_source]
                    process_vars(@statement, data_source)
                    @only_chart = params[:only_chart]
              Severity: Minor
              Found in app/controllers/concerns/blazer/query_runner.rb - About 3 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 exports has 97 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              module.exports = function(Chart) {
              
                  var helpers = Chart.helpers;
              
                  /**
              Severity: Major
              Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                Function start has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    start: function start (tag, attrs, unary) {
                      // check namespace.
                      // inherit parent ns if there is one
                      var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
                
                
                Severity: Major
                Found in app/assets/javascripts/blazer/vue.js - About 3 hrs to fix

                  Function exports has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  module.exports = function(Chart) {
                  
                      var helpers = Chart.helpers;
                  
                      Chart.defaults.global.animation = {
                  Severity: Major
                  Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                    Function renderTimePicker has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            renderTimePicker: function(side) {
                    
                                var html, selected, minDate, maxDate = this.maxDate;
                    
                                if (this.dateLimit && (!this.maxDate || this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)))
                    Severity: Major
                    Found in app/assets/javascripts/blazer/daterangepicker.js - About 3 hrs to fix

                      Function refreshOptions has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          refreshOptions: function(triggerDropdown) {
                            var i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;
                            var $active, $active_before, $create;
                      
                            if (typeof triggerDropdown === 'undefined') {
                      Severity: Major
                      Found in app/assets/javascripts/blazer/selectize.js - About 3 hrs to fix

                        Function _onDragOver has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _onDragOver: function (/**Event*/evt) {
                              var el = this.el,
                                target,
                                dragRect,
                                revert,
                        Severity: Major
                        Found in app/assets/javascripts/blazer/Sortable.js - About 3 hrs to fix

                          Function 16 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{}],16:[function(require,module,exports){
                          'use strict';
                          
                          module.exports = function(Chart) {
                          
                          
                          Severity: Major
                          Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                            Function determineDataLimits has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    determineDataLimits: function() {
                                        var me = this;
                                        var opts = me.options;
                                        var chart = me.chart;
                                        var data = chart.data;
                            Severity: Major
                            Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                              Function buildTicks has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      buildTicks: function() {
                                          var me = this;
                              
                                          me.ctx.save();
                                          var tickFontSize = helpers.getValueOrDefault(me.options.ticks.fontSize, Chart.defaults.global.defaultFontSize);
                              Severity: Major
                              Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                Function 43 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                },{"41":41}],43:[function(require,module,exports){
                                'use strict';
                                
                                module.exports = function(Chart) {
                                
                                
                                Severity: Major
                                Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                  Function 31 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  },{}],31:[function(require,module,exports){
                                  'use strict';
                                  
                                  module.exports = function(Chart) {
                                  
                                  
                                  Severity: Major
                                  Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                    Function trigger has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      trigger: function( event, data, elem, onlyHandlers ) {
                                        var handle, ontype, cur,
                                          bubbleType, special, tmp, i,
                                          eventPath = [ elem || document ],
                                          type = hasOwn.call( event, "type" ) ? event.type : event,
                                    Severity: Major
                                    Found in app/assets/javascripts/blazer/jquery.js - About 3 hrs to fix

                                      Function exports has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      module.exports = function(Chart) {
                                      
                                          var helpers = Chart.helpers;
                                      
                                          Chart.defaults.bubble = {
                                      Severity: Major
                                      Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language