angular/angular.js

View on GitHub

Showing 2,008 of 4,250 total issues

Function htmlSanitizeWriterImpl has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function htmlSanitizeWriterImpl(buf, uriValidator) {
    var ignoreCurrentElement = false;
    var out = bind(buf, buf.push);
    return {
      start: function(tag, attrs) {
Severity: Minor
Found in src/ngSanitize/sanitize.js - About 1 hr to fix

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

      this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {
        return function initDriverFn(animationDetails) {
          if (animationDetails.from && animationDetails.to) {
            var fromAnimation = prepareAnimation(animationDetails.from);
            var toAnimation = prepareAnimation(animationDetails.to);
    Severity: Minor
    Found in src/ngAnimate/animateJsDriver.js - About 1 hr to fix

      Function inject has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        window.inject = angular.mock.inject = function() {
          var blockFns = Array.prototype.slice.call(arguments, 0);
          var errorForStack = new Error('Declaration Location');
          // IE10+ and PhanthomJS do not set stack trace information, until the error is thrown
          if (!errorForStack.stack) {
      Severity: Minor
      Found in src/ngMock/angular-mocks.js - About 1 hr to fix

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

          this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) {
        
            return function(element, initialOptions) {
              // all of the animation functions should create
              // a copy of the options data, however, if a
        Severity: Minor
        Found in src/ng/animateCss.js - About 1 hr to fix

          Function replaceWith has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function replaceWith($rootElement, elementsToRemove, newNode) {
                var firstElementToRemove = elementsToRemove[0],
                    removeCount = elementsToRemove.length,
                    parent = firstElementToRemove.parentNode,
                    i, ii;
          Severity: Minor
          Found in src/ng/compile.js - About 1 hr to fix

            Function LocationHtml5Url has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {
              this.$$html5 = true;
              basePrefix = basePrefix || '';
              parseAbsoluteUrl(appBase, this);
            
            
            Severity: Minor
            Found in src/ng/location.js - About 1 hr to fix

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

                     function($rootScope,   $browser,   $q,   $$q,   $exceptionHandler) {
              
                  var deferreds = {};
              
              
              
              Severity: Minor
              Found in src/ng/timeout.js - About 1 hr to fix

                Function $$AnimateCacheProvider has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var $$AnimateCacheProvider = function() {
                
                  var KEY = '$$ngAnimateParentKey';
                  var parentCounter = 0;
                  var cache = Object.create(null);
                Severity: Minor
                Found in src/ngAnimate/animateCache.js - About 1 hr to fix

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

                  app.controller('DataController', function DataController($scope, $rootScope) {
                    var totalRows = 1000;
                    var totalColumns = 20;
                  
                    var data = $scope.data = [];
                  Severity: Minor
                  Found in benchmarks/largetable-bp/app.js - About 1 hr to fix

                    Function PlnkrOpenerCtrl has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        controller: [function PlnkrOpenerCtrl() {
                          var ctrl = this;
                    
                          ctrl.example = {
                            path: ctrl.examplePath,
                    Severity: Minor
                    Found in docs/app/src/examples.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                        "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                      Severity: Critical
                      Found in src/ngLocale/angular-locale_bs-cyrl.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                          "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                        Severity: Critical
                        Found in src/ngLocale/angular-locale_bs.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                            "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                          Severity: Critical
                          Found in src/ngLocale/angular-locale_sr-cyrl-xk.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                              "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                            Severity: Critical
                            Found in src/ngLocale/angular-locale_bs-cyrl-ba.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                              Severity: Critical
                              Found in src/ngLocale/angular-locale_sr-cyrl-ba.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                  "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                Severity: Critical
                                Found in src/ngLocale/angular-locale_bs-latn-ba.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                    "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                  Severity: Critical
                                  Found in src/ngLocale/angular-locale_sr-cyrl-rs.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                      "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                    Severity: Critical
                                    Found in src/ngLocale/angular-locale_sr-cyrl-me.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                        "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                      Severity: Critical
                                      Found in src/ngLocale/angular-locale_sr.js - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                          "pluralCat": function(n, opt_precision) {  var i = n | 0;  var vf = getVF(n, opt_precision);  if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {    return PLURAL_CATEGORY.ONE;  }  if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {    return PLURAL_CATEGORY.FEW;  }  return PLURAL_CATEGORY.OTHER;}
                                        Severity: Critical
                                        Found in src/ngLocale/angular-locale_hr-ba.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language