suitmedia/suitcoda

View on GitHub
_frontend/assets/js/vendor/jquery-barIndicator.min.js

Summary

Maintainability
F
1 wk
Test Coverage

File jquery-barIndicator.min.js has 903 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
*    jQuery - barIndicator
*    A jQuery plugin that helps you visualize percentage or absolute amounts with bars
*    Author: Ioannis Kapantzakis
*    Released under the MIT License
Severity: Major
Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 2 days to fix

    Function _init has 247 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _init: function() {
                var that = this;
                var $el = that.$el;
                var opt = that.opt;
                var selector = that.selector;
    Severity: Major
    Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 1 day to fix

      Function _getMilestones has 113 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _getMilestones: function(par) {
                  if (par) {
                      var that = par.that;
                      var $el = that.$el;    
                      var $elID = $el.attr('id');
      Severity: Major
      Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 4 hrs to fix

        Function _getAverage has 72 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _getAverage: function(par) {
                    if (par) {
                        var that = par.that;
                        var $el = that.$el;
                        var opt = that.opt;
        Severity: Major
        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 2 hrs to fix

          Function _animateBar has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _animateBar: function(par) {
                      if (par) {
                          var that = par.that;
                          var $el = that.$el;
                          var $elID = $el.attr('id');
          Severity: Major
          Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 2 hrs to fix

            Function _setAvgMilestone has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _setAvgMilestone: function(par) {
                        if (par) {
                            var that = par.that;
                            var $el = par.$el;
                            var opt = that.opt;
            Severity: Major
            Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 2 hrs to fix

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

                      _labelNumCounter: function(par) {
                          if (par) {
                              var that = par.that;
                              var opt = that.opt;
                              var $el = that.$el;
              Severity: Minor
              Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 1 hr to fix

                Function loadNewData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        loadNewData: function(par) {
                            if (par) {
                                var newNum = par;
                                var $elID = this.$el.attr('id');
                                //Get length object
                Severity: Minor
                Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 1 hr to fix

                  Function _getColorRangeClass has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          _getColorRangeClass: function(par) {
                              if (par) {                
                                  var that = par.that;
                                  var num = par.num;
                                  var $el = that.$el;
                  Severity: Minor
                  Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 1 hr to fix

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

                            reanimateBar: function() {
                                var $el = this.$el;
                                var $elID = $el.attr('id');
                                var opt = this.opt;
                                var barLength = $.data($el, 'storedAttr').barLength;
                    Severity: Minor
                    Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 1 hr to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  if (avgColorBelowAvg) {
                                                      var colBelow = Plugin.prototype._getColorValue.apply(this, [avgColorBelowAvg]);
                                                      innerBar.css({'background-color':colBelow});
                                                  }
                      Severity: Major
                      Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if (limLabelPos == 'num') {
                                                            elem.addClass('bi-limPos-num');
                                                        } else if (limLabelPos == 'title') {
                                                            elem.addClass('bi-limPos-title');
                                                        }
                        Severity: Major
                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if ($elID) {
                                                              $(document).trigger('bi_' + $elID + '.reanimateBarStop');
                                                          }
                          Severity: Major
                          Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if (rng.length == 3) {
                                                            var rngColor = rng[2];
                                                            var rngCl = Plugin.prototype._getColorValue.apply(this, [rngColor]);
                                                            if (typeof rngCl !== 'undefined') {
                                                                bar.css({'background-color':rngCl});
                            Severity: Major
                            Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                              if ($elID) {
                                                                  $(document).trigger('bi_' + $elID + '.loadDataStop');
                                                              }
                              Severity: Major
                              Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                if (self.attr('data-lbNum').indexOf(numArrMin) != -1 && limMinVisible) {
                                                                    self.addClass('bi-lbNum-min').find('.bi-limSpan').html(limMinLabel).addClass('bi-limSpan-min');
                                                                }
                                Severity: Major
                                Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                  if (self.attr('data-lbNum').indexOf(numArrMax) != -1 && limMaxVisible) {
                                                                      self.addClass('bi-lbNum-max').find('.bi-limSpan').html(limMaxLabel).addClass('bi-limSpan-max');                                    
                                                                  }
                                  Severity: Major
                                  Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if (opt.numType == 'percent') {
                                                                    mlstLb += '%';
                                                                }
                                    Severity: Major
                                    Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if (avgColorAboveAvg) {
                                                                      var colAbove = Plugin.prototype._getColorValue.apply(this, [avgColorAboveAvg]);
                                                                      innerBar.css({'background-color':colAbove});
                                                                  }
                                      Severity: Major
                                      Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 45 mins to fix

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

                                                            } else if (style == 'horizontal') {
                                                                if (par.reanim) {
                                                                    bar.css({'width':0}); 
                                                                }
                                                                bar.animate({'width':bl},at,eas).queue(function() {
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 day to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 403..449

                                        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 235.

                                        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

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

                                                            if (style == 'vertical') {
                                                                if (par.reanim) {
                                                                    bar.css({'height':0}); 
                                                                }
                                                                bar.animate({'height':bl},at,eas).queue(function() {
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 day to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 426..449

                                        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 235.

                                        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

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

                                                                if (style == 'vertical') {                        
                                                                    ml.css({'width':d});
                                                                    var mlW = ml.css('width');
                                                                    var mrgL = parseFloat(mlW.replace('px','')) / 2;
                                                                    ml.css({marginLeft: -mrgL + 'px'});
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 2 hrs to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 636..641

                                        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 83.

                                        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

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

                                                                } else if (style == 'horizontal') {
                                                                    ml.css({'height':d});
                                                                    var mlH = ml.css('height');
                                                                    var mrgT = parseFloat(mlH.replace('px','')) / 2;
                                                                    ml.css({marginTop: -mrgT + 'px'});
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 2 hrs to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 631..641

                                        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 83.

                                        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

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

                                                            if (style == 'vertical') {                        
                                                                ml.css({
                                                                    'bottom':mlPos,
                                                                    'height':mlHoverRange + 'px',
                                                                    'margin-bottom': -absolutePull + 'px'
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 605..615

                                        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 73.

                                        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

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

                                                            } else if (style == 'horizontal') {
                                                                ml.css({
                                                                    'left':mlPos,
                                                                    'width':mlHoverRange + 'px',
                                                                    'margin-left': -absolutePull + 'px'
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 595..615

                                        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 73.

                                        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

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

                                                                        if (self.attr('data-lbNum').indexOf(numArrMax) != -1 && limMaxVisible) {
                                                                            self.addClass('bi-lbNum-max').find('.bi-limSpan').html(limMaxLabel).addClass('bi-limSpan-max');                                    
                                                                        }
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 701..703

                                        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 68.

                                        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

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

                                                                        if (self.attr('data-lbNum').indexOf(numArrMin) != -1 && limMinVisible) {
                                                                            self.addClass('bi-lbNum-min').find('.bi-limSpan').html(limMinLabel).addClass('bi-limSpan-min');
                                                                        }
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 704..706

                                        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 68.

                                        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

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

                                                                } else {
                                                                    $el.addClass('bi-avgBelow');
                                                                    if (avgColorBelowAvg) {
                                                                        var colBelow = Plugin.prototype._getColorValue.apply(this, [avgColorBelowAvg]);
                                                                        innerBar.css({'background-color':colBelow});
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 753..759

                                        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 64.

                                        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

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

                                                                if (parseFloat(lbNum) > avg) {
                                                                    $el.addClass('bi-avgAbove');
                                                                    if (avgColorAboveAvg) {
                                                                        var colAbove = Plugin.prototype._getColorValue.apply(this, [avgColorAboveAvg]);
                                                                        innerBar.css({'background-color':colAbove});
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 759..765

                                        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 64.

                                        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

                                        Identical blocks of code found in 3 locations. Consider refactoring.
                                        Open

                                                                $(window).load(function() {
                                                                    Plugin.prototype._animateBar.apply(this, [paramsAnim]);
                                                                    if (opt.labelNumCount) {
                                                                        Plugin.prototype._labelNumCounter.apply(this, [paramsCount]);
                                                                    }
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 2 other locations - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 281..286
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 289..294

                                        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 61.

                                        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

                                        Identical blocks of code found in 3 locations. Consider refactoring.
                                        Open

                                                                $(document).on(event, function() {
                                                                    Plugin.prototype._animateBar.apply(this, [paramsAnim]);
                                                                    if (opt.labelNumCount) {
                                                                        Plugin.prototype._labelNumCounter.apply(this, [paramsCount]);
                                                                    }
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 2 other locations - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 274..279
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 289..294

                                        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 61.

                                        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

                                        Identical blocks of code found in 3 locations. Consider refactoring.
                                        Open

                                                            setTimeout(function() {
                                                                Plugin.prototype._animateBar.apply(this, [paramsAnim]);
                                                                if (opt.labelNumCount) {
                                                                    Plugin.prototype._labelNumCounter.apply(this, [paramsCount]);
                                                                }
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 2 other locations - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 274..279
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 281..286

                                        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 61.

                                        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

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

                                                    if (foreColor) {
                                                        var fColor = Plugin.prototype._getColorValue.apply(this, [foreColor]);
                                                        if (fColor) {
                                                            bi_bar.css({'background-color':fColor});
                                                        }
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 200..205

                                        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 57.

                                        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

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

                                                    if (backColor) {
                                                        var bColor = Plugin.prototype._getColorValue.apply(this, [backColor]);
                                                        if (bColor) {
                                                            bi_barHolder.css({'background-color':bColor});
                                                        }
                                        Severity: Major
                                        Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
                                        _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 194..199

                                        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 57.

                                        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

                                        There are no issues that match your filters.

                                        Category
                                        Status