fossasia/loklak_webclient

View on GitHub
app/js/components/ui-choices.js

Summary

Maintainability
B
6 hrs
Test Coverage

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

    link: function(s, e, a){
      var that, update;
      if (!e.hasClass('ui')) {
        e.addClass('btn-group');
      }
Severity: Major
Found in app/js/components/ui-choices.js - About 3 hrs to fix

    Function controller has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        controller: ['$scope', '$element'].concat(function($scope, $element){
          $scope.btntype = $element.attr('btn-type');
          $scope.node = this.node = {
            d: {},
            add: function(e, a){
    Severity: Minor
    Found in app/js/components/ui-choices.js - About 1 hr to fix

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

          link: function(s, e, a, c){
            var ref$, btntype, that;
            if (!e.hasClass('ui')) {
              e.addClass('btn');
            }
      Severity: Minor
      Found in app/js/components/ui-choices.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status