angular/angular.js

View on GitHub

Showing 2,008 of 4,250 total issues

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.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

      "pluralCat": function(n, opt_precision) {  if (n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) {    return PLURAL_CATEGORY.ONE;  }  if (n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) {    return PLURAL_CATEGORY.TWO;  }  if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) {    return PLURAL_CATEGORY.FEW;  }  if (n != 0 && n % 1000000 == 0) {    return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
    Severity: Critical
    Found in src/ngLocale/angular-locale_br.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-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_bs-latn.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_sh.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-hr.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-latn-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-latn-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-latn-xk.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                      "pluralCat": function(n, opt_precision) {  if (n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) {    return PLURAL_CATEGORY.ONE;  }  if (n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) {    return PLURAL_CATEGORY.TWO;  }  if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) {    return PLURAL_CATEGORY.FEW;  }  if (n != 0 && n % 1000000 == 0) {    return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
                    Severity: Critical
                    Found in src/ngLocale/angular-locale_br-fr.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-latn.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.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                            if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) {
                              return goog.i18n.pluralRules.Keyword.FEW;
                            }
                          Severity: Critical
                          Found in i18n/closure/pluralRules.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                              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 goog.i18n.pluralRules.Keyword.FEW;
                              }
                            Severity: Critical
                            Found in i18n/closure/pluralRules.js - About 1 hr to fix

                              Function ngIfDirective has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var ngIfDirective = ['$animate', '$compile', function($animate, $compile) {
                                return {
                                  multiElement: true,
                                  transclude: 'element',
                                  priority: 600,
                              Severity: Minor
                              Found in src/ng/directive/ngIf.js - About 1 hr to fix

                                Function NgModelController has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) {
                                  this.$viewValue = Number.NaN;
                                  this.$modelValue = Number.NaN;
                                  this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.
                                  this.$validators = {};
                                Severity: Minor
                                Found in src/ng/directive/ngModel.js - About 1 hr to fix

                                  Function registerNativePropertyContexts has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    (function registerNativePropertyContexts() {
                                      function registerContext(ctx, values) {
                                        forEach(values, function(v) { PROP_CONTEXTS[v.toLowerCase()] = ctx; });
                                      }
                                  
                                  
                                  Severity: Minor
                                  Found in src/ng/compile.js - About 1 hr to fix

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

                                      compile: function(ast) {
                                        var self = this;
                                        findConstantAndWatchExpressions(ast, self.$filter);
                                        var assignable;
                                        var assign;
                                    Severity: Minor
                                    Found in src/ng/parse.js - About 1 hr to fix

                                      Function deepCompare has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) {
                                        var actualType = getTypeForFilter(actual);
                                        var expectedType = getTypeForFilter(expected);
                                      
                                        if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
                                      Severity: Minor
                                      Found in src/ng/filter/filter.js - About 1 hr to fix

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

                                        module.exports = function(grunt) {
                                        
                                          grunt.registerMultiTask('min', 'minify JS files', function() {
                                            util.min(this.data, this.async());
                                          });
                                        Severity: Minor
                                        Found in lib/grunt/plugins.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language