FanaHOVA/blazer

View on GitHub

Showing 544 of 841 total issues

Function renderMixin has 155 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function renderMixin (Vue) {
  Vue.prototype.$nextTick = function (fn) {
    nextTick(fn, this);
  };

Severity: Major
Found in app/assets/javascripts/blazer/vue.js - About 6 hrs to fix

    Function 6 has 150 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"4":4}],6:[function(require,module,exports){
    module.exports = {
        "aliceblue": [240, 248, 255],
        "antiquewhite": [250, 235, 215],
        "aqua": [0, 255, 255],
    Severity: Major
    Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

      Function renderCalendar has 149 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              renderCalendar: function(side) {
      
                  //
                  // Build the matrix of dates that will populate the calendar
                  //
      Severity: Major
      Found in app/assets/javascripts/blazer/daterangepicker.js - About 5 hrs to fix

        Function 44 has 147 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

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

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

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

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

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

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

                Function lifecycleMixin has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function lifecycleMixin (Vue) {
                  Vue.prototype._mount = function (
                    el,
                    hydrating
                  ) {
                Severity: Major
                Found in app/assets/javascripts/blazer/vue.js - About 5 hrs to fix

                  Function setup has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      setup: function() {
                        var self      = this;
                        var settings  = self.settings;
                        var eventNS   = self.eventNS;
                        var $window   = $(window);
                  Severity: Major
                  Found in app/assets/javascripts/blazer/selectize.js - About 5 hrs to fix

                    Function 20 has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Function createDataTable has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              var createDataTable = function (chart, options, chartType) {
                                var datasets = [];
                                var labels = [];
                      
                                var colors = chart.options.colors || defaultColors;
                      Severity: Major
                      Found in app/assets/javascripts/blazer/chartkick.js - About 5 hrs to fix

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

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

                          Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          jQuery.Callbacks = function( options ) {
                          
                            // Convert options from String-formatted to Object-formatted if needed
                            // (we check in cache first)
                            options = typeof options === "string" ?
                          Severity: Major
                          Found in app/assets/javascripts/blazer/jquery.js - About 5 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                  if ( event.pageX == null && original.clientX != null ) {
                                    eventDoc = event.target.ownerDocument || document;
                                    doc = eventDoc.documentElement;
                                    body = eventDoc.body;
                            
                            
                            Severity: Critical
                            Found in app/assets/javascripts/blazer/jquery.js - About 5 hrs to fix

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

                                      draw: function() {
                                          var me = this;
                                          var vm = me._view;
                                          var spanGaps = vm.spanGaps;
                                          var fillPoint = vm.scaleZero;
                              Severity: Major
                              Found in app/assets/javascripts/blazer/Chart.js - About 4 hrs to fix

                                Method update_state has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def update_state(result)
                                      check_type =
                                        if respond_to?(:check_type)
                                          self.check_type
                                        elsif respond_to?(:invert)
                                Severity: Minor
                                Found in app/models/blazer/check.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 addTimeToArrayFromToken has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function addTimeToArrayFromToken(token, input, config) {
                                        var a, datePartArray = config._a;
                                
                                        switch (token) {
                                        // QUARTER
                                Severity: Major
                                Found in app/assets/javascripts/blazer/moment.js - About 4 hrs to fix

                                  Function selectize has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    $.fn.selectize = function(settings_user) {
                                      var defaults             = $.fn.selectize.defaults;
                                      var settings             = $.extend({}, defaults, settings_user);
                                      var attr_data            = settings.dataAttr;
                                      var field_label          = settings.labelField;
                                  Severity: Major
                                  Found in app/assets/javascripts/blazer/selectize.js - About 4 hrs to fix

                                    Function 22 has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{}],22:[function(require,module,exports){
                                    'use strict';
                                    
                                    module.exports = function(Chart) {
                                        // Global Chart canvas helpers object for drawing items to canvas
                                    Severity: Major
                                    Found in app/assets/javascripts/blazer/Chart.js - About 4 hrs to fix

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

                                      module.exports = function(Chart) {
                                          // Global Chart canvas helpers object for drawing items to canvas
                                          var helpers = Chart.canvasHelpers = {};
                                      
                                          helpers.drawPoint = function(ctx, pointStyle, radius, x, y) {
                                      Severity: Major
                                      Found in app/assets/javascripts/blazer/Chart.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language