angular/angular.js

View on GitHub

Showing 2,008 of 4,250 total issues

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

  function loadModules(modulesToLoad) {
    assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');
    var runBlocks = [], moduleFn;
    forEach(modulesToLoad, function(module) {
      if (loadedModules.get(module)) return;
Severity: Minor
Found in src/auto/injector.js - About 1 hr to fix

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

          function close(rejected) {
            // if the promise has been called already then we shouldn't close
            // the animation again
            if (animationClosed || (animationCompleted && animationPaused)) return;
            animationClosed = true;
    Severity: Minor
    Found in src/ngAnimate/animateCss.js - About 1 hr to fix

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

      module.exports = function jqueryDeployment(getVersion) {
        return {
          name: 'jquery',
          examples: {
            commonFiles: {
      Severity: Minor
      Found in docs/config/services/deployments/jquery.js - About 1 hr to fix

        Function updateOptions has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              function updateOptions() {
                var previousValue = options && selectCtrl.readValue();
        
                // We must remove all current options, but cannot simply set innerHTML = null
                // since the providedEmptyOption might have an ngIf on it that inserts comments which we
        Severity: Minor
        Found in src/ng/directive/ngOptions.js - About 1 hr to fix

          Function ngRefDirective has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var ngRefDirective = ['$parse', function($parse) {
            return {
              priority: -1, // Needed for compatibility with element transclusion on the same element
              restrict: 'A',
              compile: function(tElement, tAttrs) {
          Severity: Minor
          Found in src/ng/directive/ngRef.js - About 1 hr to fix

            Function readString has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              readString: function(quote) {
                var start = this.index;
                this.index++;
                var string = '';
                var rawString = quote;
            Severity: Minor
            Found in src/ng/parse.js - About 1 hr to fix

              Function $get has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                this.$get = ['$window', function($window) {
                  // Support: IE 9-11, Edge 12-14+
                  // IE/Edge display errors in such a way that it requires the user to click in 4 places
                  // to see the stack trace. There is no way to feature-detect it so there's a chance
                  // of the user agent sniffing to go wrong but since it's only about logging, this shouldn't
              Severity: Minor
              Found in src/ng/log.js - About 1 hr to fix

                Function compositeLinkFn has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {
                        var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;
                        var stableNodeList;
                
                
                
                Severity: Minor
                Found in src/ng/compile.js - About 1 hr to fix

                  Function $emit has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        $emit: function(name, args) {
                          var empty = [],
                              namedListeners,
                              scope = this,
                              stopPropagation = false,
                  Severity: Minor
                  Found in src/ng/rootScope.js - About 1 hr to fix

                    Function DataController has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    app.controller('DataController', function DataController($rootScope, $scope) {
                      this.ngRepeatCount = 5000;
                      this.rows = [];
                      var self = this;
                    
                    
                    Severity: Minor
                    Found in benchmarks/orderby-bp/app.js - About 1 hr to fix

                      Function equals has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function equals(o1, o2) {
                        if (o1 === o2) return true;
                        if (o1 === null || o2 === null) return false;
                        // eslint-disable-next-line no-self-compare
                        if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
                      Severity: Minor
                      Found in src/Angular.js - About 1 hr to fix

                        Function exports has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports = function(grunt) {
                        
                          grunt.registerTask('validate-angular-files', function() {
                            var combinedFiles = _.clone(files.angularModules);
                            combinedFiles.ng = files.angularSrc;
                        Severity: Minor
                        Found in lib/grunt/validate-angular-files.js - About 1 hr to fix

                          Function parsePattern has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function parsePattern(pattern) {
                            var p = {
                                      minInt: 1,
                                      minFrac: 0,
                                      maxFrac: 0,
                          Severity: Minor
                          Found in i18n/src/parser.js - About 1 hr to fix

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

                            function $$CookieReader($document) {
                              var rawDocument = $document[0] || {};
                              var lastCookies = {};
                              var lastCookieString = '';
                            
                            
                            Severity: Minor
                            Found in src/ng/cookieReader.js - About 1 hr to fix

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

                                  function getControllers(directiveName, require, $element, elementControllers) {
                                    var value;
                              
                                    if (isString(require)) {
                                      var match = require.match(REQUIRE_PREFIX_REGEXP);
                              Severity: Minor
                              Found in src/ng/compile.js - About 1 hr to fix

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

                                  this.directive = function registerDirective(name, directiveFactory) {
                                    assertArg(name, 'name');
                                    assertNotHasOwnProperty(name, 'directive');
                                    if (isString(name)) {
                                      assertValidDirectiveName(name);
                                Severity: Minor
                                Found in src/ng/compile.js - About 1 hr to fix

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

                                    this.$get = function() {
                                      var $log = {
                                        log: function() { $log.log.logs.push(concat([], arguments, 0)); },
                                        warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
                                        info: function() { $log.info.logs.push(concat([], arguments, 0)); },
                                  Severity: Minor
                                  Found in src/ngMock/angular-mocks.js - About 1 hr to fix

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

                                      this.$get = [function() {
                                        return {
                                          cacheKey: function(node, method, addClass, removeClass) {
                                            var parentNode = node.parentNode;
                                            var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
                                    Severity: Minor
                                    Found in src/ngAnimate/animateCache.js - About 1 hr to fix

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

                                      function jqLiteBuildFragment(html, context) {
                                        var tmp, tag, wrap, finalHtml,
                                            fragment = context.createDocumentFragment(),
                                            nodes = [], i;
                                      
                                      
                                      Severity: Minor
                                      Found in src/jqLite.js - About 1 hr to fix

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

                                            link: function(scope, element, attr, ngSwitchController) {
                                              var watchExpr = attr.ngSwitch || attr.on,
                                                  selectedTranscludes = [],
                                                  selectedElements = [],
                                                  previousLeaveAnimations = [],
                                        Severity: Minor
                                        Found in src/ng/directive/ngSwitch.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language