ncbo/bioportal_web_ui

View on GitHub
public/browse/lib/angular-bindonce/bindonce.js

Summary

Maintainability
D
1 day
Test Coverage

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

            controller: ['$scope', '$element', '$attrs', '$interpolate', function ($scope, $element, $attrs, $interpolate)
            {
                var showHideBinder = function (elm, attr, value)
                {
                    var show = (attr === 'show') ? '' : 'none';
Severity: Major
Found in public/browse/lib/angular-bindonce/bindonce.js - About 6 hrs to fix

    Function runBinders has 79 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                        runBinders: function ()
                        {
                            while (this.binders.length > 0)
                            {
                                var binder = this.binders.shift();
    Severity: Major
    Found in public/browse/lib/angular-bindonce/bindonce.js - About 3 hrs to fix

      File bindonce.js has 294 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function () {
          "use strict";
          /**
           * Bindonce - Zero watches binding for AngularJs
           * @version v0.3.3
      Severity: Minor
      Found in public/browse/lib/angular-bindonce/bindonce.js - About 3 hrs to fix

        Function compile has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        compile: function (tElement, tAttrs, transclude)
                        {
                            return function (scope, elm, attrs, controllers)
                            {
                                var bindonceController = controllers[0];
        Severity: Minor
        Found in public/browse/lib/angular-bindonce/bindonce.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if (value && value.length !== 0)
                      {
                          var v = angular.lowercase("" + value);
                          value = !(v === 'f' || v === '0' || v === 'false' || v === 'no' || v === 'n' || v === '[]');
                      }
          Severity: Major
          Found in public/browse/lib/angular-bindonce/bindonce.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status