angular/angular.js

View on GitHub
src/ngMessages/messages.js

Summary

Maintainability
D
2 days
Test Coverage

Function NgMessagesCtrl has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      controller: ['$element', '$scope', '$attrs', function NgMessagesCtrl($element, $scope, $attrs) {
        var ctrl = this;
        var latestKey = 0;
        var nextAttachId = 0;

Severity: Major
Found in src/ngMessages/messages.js - About 5 hrs to fix

    Function ngMessageDirectiveFactory has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function ngMessageDirectiveFactory(isDefault) {
      return ['$animate', function($animate) {
        return {
          restrict: 'AE',
          transclude: 'element',
    Severity: Major
    Found in src/ngMessages/messages.js - About 2 hrs to fix

      File messages.js has 271 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      'use strict';
      
      var forEach;
      var isArray;
      var isString;
      Severity: Minor
      Found in src/ngMessages/messages.js - About 2 hrs to fix

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

              link: function(scope, element, attrs, ngMessagesCtrl, $transclude) {
                var commentNode, records, staticExp, dynamicExp;
        
                if (!isDefault) {
                  commentNode = element[0];
        Severity: Major
        Found in src/ngMessages/messages.js - About 2 hrs to fix

          Function render has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  this.render = function(collection) {
                    collection = collection || {};
          
                    renderLater = false;
                    cachedCollection = collection;
          Severity: Minor
          Found in src/ngMessages/messages.js - About 2 hrs to fix

            Avoid deeply nested control flow statements.
            Open

                                if (matchedKeys[key]) return;
            Severity: Major
            Found in src/ngMessages/messages.js - About 45 mins to fix

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

                    link: function(scope, element, attrs, ngMessagesCtrl, $transclude) {
              Severity: Minor
              Found in src/ngMessages/messages.js - About 35 mins to fix

                There are no issues that match your filters.

                Category
                Status