candreoliveira/ngMask

View on GitHub

Showing 16 of 34 total issues

Function create has 309 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function create() {
        var options;
        var maskWithoutOptionals;
        var maskWithoutOptionalsLength = 0;
        var maskWithoutOptionalsAndDivisorsLength = 0;
Severity: Major
Found in examples/dist/ngMask.js - About 1 day to fix

    Function create has 309 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function create() {
            var options;
            var maskWithoutOptionals;
            var maskWithoutOptionalsLength = 0;
            var maskWithoutOptionalsAndDivisorsLength = 0;
    Severity: Major
    Found in src/services/maskService.js - About 1 day to fix

      File ngMask.js has 562 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function() {
        'use strict';
        angular.module('ngMask', []);
      })();(function() {
        'use strict';
      Severity: Major
      Found in examples/dist/ngMask.js - About 1 day to fix

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

                compile: function($element, $attrs) { 
                 if (!$attrs.mask || !$attrs.ngModel) {
                    $log.info('Mask and ng-model attributes are required!');
                    return;
                  }
        Severity: Major
        Found in examples/dist/ngMask.js - About 4 hrs to fix

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

                  compile: function($element, $attrs) { 
                   if (!$attrs.mask || !$attrs.ngModel) {
                      $log.info('Mask and ng-model attributes are required!');
                      return;
                    }
          Severity: Major
          Found in src/directives/mask.js - About 4 hrs to fix

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

            (function() {
              'use strict';
              angular.module('ngMask')
                .factory('MaskService', ['$q', 'OptionalService', 'UtilService', function($q, OptionalService, UtilService) {
                  function create() {
            Severity: Minor
            Found in src/services/maskService.js - About 3 hrs to fix

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

                          post: function($scope, $element, $attrs, controller) {
                            promise.then(function() {
                              // get initial options
                              var timeout;
                              var options = maskService.getOptions();
              Severity: Major
              Found in examples/dist/ngMask.js - About 3 hrs to fix

                Function post has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            post: function($scope, $element, $attrs, controller) {
                              promise.then(function() {
                                // get initial options
                                var timeout;
                                var options = maskService.getOptions();
                Severity: Major
                Found in src/directives/mask.js - About 3 hrs to fix

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

                                  function parseViewValue(value) {
                                    var untouchedValue = value;
                                    // set default value equal 0
                                    value = value || '';
                  
                  
                  Severity: Major
                  Found in examples/dist/ngMask.js - About 2 hrs to fix

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

                                    function parseViewValue(value) {
                                      var untouchedValue = value;
                                      // set default value equal 0
                                      value = value || '';
                    
                    
                    Severity: Major
                    Found in src/directives/mask.js - About 2 hrs to fix

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

                              function generateRegex(opts) {
                                var deferred = $q.defer();
                                options = opts;
                      
                                try {
                      Severity: Minor
                      Found in src/services/maskService.js - About 1 hr to fix

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

                                function generateRegex(opts) {
                                  var deferred = $q.defer();
                                  options = opts;
                        
                                  try {
                        Severity: Minor
                        Found in examples/dist/ngMask.js - About 1 hr to fix

                          Function tryDivisorConfiguration has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function tryDivisorConfiguration(value) {
                                    var output = value.split('');
                                    var defaultDivisors = true;
                          
                                    // has optional?
                          Severity: Minor
                          Found in examples/dist/ngMask.js - About 1 hr to fix

                            Function tryDivisorConfiguration has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function tryDivisorConfiguration(value) {
                                      var output = value.split('');
                                      var defaultDivisors = true;
                            
                                      // has optional?
                            Severity: Minor
                            Found in src/services/maskService.js - About 1 hr to fix

                              Function lazyProduct has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    function lazyProduct(sets, f, context){
                                      if (!context){
                                        context=this;
                                      }
                              
                              
                              Severity: Minor
                              Found in examples/dist/ngMask.js - About 1 hr to fix

                                Function lazyProduct has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      function lazyProduct(sets, f, context){
                                        if (!context){
                                          context=this;
                                        }
                                
                                
                                Severity: Minor
                                Found in src/services/utilService.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language