epeschier/angular-numeric-directive

View on GitHub
src/numeric-directive.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function numeric has 198 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

    function numeric($locale) {
        // Usage:
        //     <input type="text" decimals="3" min="-20" max="40" formatting="false" ></input>
        // Creates:
        // 
Severity: Major
Found in src/numeric-directive.js - About 7 hrs to fix

    Function link has 190 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

            function link(scope, el, attrs, ngModelCtrl) {
                var decimalSeparator = $locale.NUMBER_FORMATS.DECIMAL_SEP;
                var groupSeparator = $locale.NUMBER_FORMATS.GROUP_SEP;
    
                // Create new regular expression with current decimal separator.
    Severity: Major
    Found in src/numeric-directive.js - About 7 hrs to fix

      Function parseViewValue has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  function parseViewValue(value) {
                      if (angular.isUndefined(value)) {
                          value = '';
                      }
                      value = (""+value).replace(decimalSeparator, '.');
      Severity: Minor
      Found in src/numeric-directive.js - About 1 hr to fix

        Function minmaxValidator has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    function minmaxValidator(value, testValue, validityName, limit, compareFunction) {
        Severity: Minor
        Found in src/numeric-directive.js - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status