joshsoftware/code-curiosity

View on GitHub
app/assets/javascripts/jquery.barrating.js

Summary

Maintainability
F
3 days
Test Coverage

Function BarRating has 264 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var BarRating = (function() {

        function BarRating() {
            var self = this;

Severity: Major
Found in app/assets/javascripts/jquery.barrating.js - About 1 day to fix

    Function BarRating has 256 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function BarRating() {
                var self = this;
    
                // wrap element in a wrapper div
                var wrapElement = function() {
    Severity: Major
    Found in app/assets/javascripts/jquery.barrating.js - About 1 day to fix

      File jquery.barrating.js has 320 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * jQuery Bar Rating Plugin v1.1.3
       *
       * http://github.com/antennaio/jquery-bar-rating
       *
      Severity: Minor
      Found in app/assets/javascripts/jquery.barrating.js - About 3 hrs to fix

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

                    var attachClickHandler = function($elements) {
                        $elements.on('click.barrating', function(event) {
                            var $a = $(this),
                                options = getData('userOptions'),
                                value,
        Severity: Minor
        Found in app/assets/javascripts/jquery.barrating.js - About 1 hr to fix

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

                      var buildWidget = function() {
                          var $w = $('<div />', { 'class': 'br-widget' });
          
                          // create A elements that will replace OPTIONs
                          self.$elem.find('option').each(function() {
          Severity: Minor
          Found in app/assets/javascripts/jquery.barrating.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status