FanaHOVA/blazer

View on GitHub

Showing 544 of 841 total issues

Function resolveSlots has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function resolveSlots (
  renderChildren,
  context
) {
  var slots = {};
Severity: Minor
Found in app/assets/javascripts/blazer/vue.js - About 1 hr to fix

    Function calculateBarY has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            calculateBarY: function(index, datasetIndex) {
                var me = this;
                var meta = me.getMeta();
                var yScale = me.getScaleForId(meta.yAxisID);
                var value = Number(me.getDataset().data[index]);
    Severity: Minor
    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

      Function calculateBarX has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              calculateBarX: function(index, datasetIndex) {
                  var me = this;
                  var meta = me.getMeta();
                  var xScale = me.getScaleForId(meta.xAxisID);
                  var value = Number(me.getDataset().data[index]);
      Severity: Minor
      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

        Function _updateFromParent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Vue.prototype._updateFromParent = function (
            propsData,
            listeners,
            parentVnode,
            renderChildren
        Severity: Minor
        Found in app/assets/javascripts/blazer/vue.js - About 1 hr to fix

          Function run has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Watcher.prototype.run = function run () {
            if (this.active) {
              var value = this.get();
                if (
                  value !== this.value ||
          Severity: Minor
          Found in app/assets/javascripts/blazer/vue.js - About 1 hr to fix

            Function chars has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                chars: function chars (text) {
                  if (!currentParent) {
                    if ("development" !== 'production' && !warned && text === template) {
                      warned = true;
                      warn$1(
            Severity: Minor
            Found in app/assets/javascripts/blazer/vue.js - About 1 hr to fix

              Function initAssetRegisters has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function initAssetRegisters (Vue) {
                /**
                 * Create asset registration methods.
                 */
                config._assetTypes.forEach(function (type) {
              Severity: Minor
              Found in app/assets/javascripts/blazer/vue.js - About 1 hr to fix

                Function genCheckboxModel has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function genCheckboxModel (el, value) {
                  if ("development" !== 'production' &&
                    el.attrsMap.checked != null) {
                    warn$3(
                      "<" + (el.tag) + " v-model=\"" + value + "\" checked>:\n" +
                Severity: Minor
                Found in app/assets/javascripts/blazer/vue.js - About 1 hr to fix

                  Function logarithmic has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              logarithmic: function(generationOptions, dataRange) {
                                  var ticks = [];
                                  var getValueOrDefault = helpers.getValueOrDefault;
                  
                                  // Figure out what the max number of ticks we can support it is based on the size of
                  Severity: Minor
                  Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                    Function handleTickRangeOptions has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            handleTickRangeOptions: function() {
                                var me = this;
                                var opts = me.options;
                                var tickOpts = opts.ticks;
                    
                    
                    Severity: Minor
                    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                      Function 33 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Function linear has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    linear: function(generationOptions, dataRange) {
                                        var ticks = [];
                                        // To get a "nice" value for the tick spacing, we will use the appropriately named
                                        // "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
                                        // for details.
                        Severity: Minor
                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                          Function renderPieChart has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  this.renderPieChart = function (chart) {
                                    var options = merge({}, baseOptions);
                                    if (chart.options.donut) {
                                      options.cutoutPercentage = 50;
                                    }
                          Severity: Minor
                          Found in app/assets/javascripts/blazer/chartkick.js - About 1 hr to fix

                            Function parseISO8601 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function parseISO8601(input) {
                                var day, hour, matches, milliseconds, minutes, month, offset, result, seconds, type, year;
                                type = Object.prototype.toString.call(input);
                                if (type === "[object Date]") {
                                  return input;
                            Severity: Minor
                            Found in app/assets/javascripts/blazer/chartkick.js - About 1 hr to fix

                              Function checkPosition has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                Affix.prototype.checkPosition = function () {
                                  if (!this.$element.is(':visible')) return
                              
                                  var height       = this.$element.height()
                                  var offset       = this.options.offset
                              Severity: Minor
                              Found in app/assets/javascripts/blazer/bootstrap.js - About 1 hr to fix

                                Method perform has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def perform(data_source, statement, options = {})
                                      query = options[:query]
                                      Blazer.transform_statement.call(data_source, statement) if Blazer.transform_statement
                                
                                      # audit
                                Severity: Minor
                                Found in lib/blazer/run_statement.rb - About 1 hr to fix

                                  Method run_check has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    def self.run_check(check)
                                      rows = nil
                                      error = nil
                                      tries = 1
                                  
                                  
                                  Severity: Minor
                                  Found in lib/blazer.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 setup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      setup: function() {
                                  
                                        if ( rformElems.test( this.nodeName ) ) {
                                          // IE doesn't fire change on a check/radio until blur; trigger it on click
                                          // after a propertychange. Eat the blur-change in special.change.handle.
                                  Severity: Minor
                                  Found in app/assets/javascripts/blazer/jquery.js - About 1 hr to fix

                                    Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function propFilter( props, specialEasing ) {
                                      var index, name, easing, value, hooks;
                                    
                                      // camelCase, specialEasing and expand cssHook pass
                                      for ( index in props ) {
                                    Severity: Minor
                                    Found in app/assets/javascripts/blazer/jquery.js - About 1 hr to fix

                                      Function initData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function initData (vm) {
                                        var data = vm.$options.data;
                                        data = vm._data = typeof data === 'function'
                                          ? data.call(vm)
                                          : data || {};
                                      Severity: Minor
                                      Found in app/assets/javascripts/blazer/vue.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language