arey/angular-musicbrainz

View on GitHub

Showing 290 of 632 total issues

Consider simplifying this complex logical expression.
Open

  "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
Severity: Major
Found in app/lib/angular-i18n/angular-locale_sr.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

      "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
    Severity: Major
    Found in app/lib/angular-i18n/angular-locale_hr-hr.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

        "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
      Severity: Major
      Found in app/lib/angular-i18n/angular-locale_hr.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

          "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
        Severity: Major
        Found in app/lib/angular-i18n/angular-locale_ru.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

            "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
          Severity: Major
          Found in app/lib/angular-i18n/angular-locale_uk.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

              "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
            Severity: Major
            Found in app/lib/angular-i18n/angular-locale_uk-ua.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
              Severity: Major
              Found in app/lib/angular-i18n/angular-locale_sr-latn-rs.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                  "pluralCat": function (n) {  if (n % 10 == 1 && n % 100 != 11) {   return PLURAL_CATEGORY.ONE;  }  if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {   return PLURAL_CATEGORY.FEW;  }  if (n % 10 == 0 || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 11 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
                Severity: Major
                Found in app/lib/angular-i18n/angular-locale_ru-ru.js - About 1 hr to fix

                  Function TabsetCtrl has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  .controller('TabsetController', ['$scope', function TabsetCtrl($scope) {
                    var ctrl = this,
                        tabs = ctrl.tabs = $scope.tabs = [];
                  
                    ctrl.select = function(tab) {
                  Severity: Minor
                  Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 55 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function parseSubSections has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Parser.prototype.parseSubSections = function (section) {
                    while (true) {
                      var subsection = this.parseSubSection();
                      if (subsection === null) {
                        if (section.subsections.length === 0) {
                  Severity: Minor
                  Found in app/lib/bootstrap/grunt/bs-lessdoc-parser.js - About 55 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function _shift has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Tokenizer.prototype._shift = function () {
                    // returning null signals EOF
                    // returning undefined means the line was ignored
                    if (this._next !== undefined) {
                      var result = this._next;
                  Severity: Minor
                  Found in app/lib/bootstrap/grunt/bs-lessdoc-parser.js - About 55 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function TabsetCtrl has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  .controller('TabsetController', ['$scope', function TabsetCtrl($scope) {
                    var ctrl = this,
                        tabs = ctrl.tabs = $scope.tabs = [];
                  
                    ctrl.select = function(tab) {
                  Severity: Minor
                  Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js - About 55 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function exports has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  module.exports = function (grunt) {
                    'use strict';
                  
                    // Force use of Unix newlines
                    grunt.util.linefeed = '\n';
                  Severity: Minor
                  Found in app/lib/bootstrap/Gruntfile.js - About 55 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                  Severity: Major
                  Found in app/lib/jquery/jquery.js - About 50 mins to fix

                    Function $httpBackend has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
                    Severity: Major
                    Found in app/lib/angular-mocks/angular-mocks.js - About 50 mins to fix

                      Function $get has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        this.$get = [ '$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', function ( $window, $compile, $timeout, $parse, $document, $position, $interpolate ) {
                      Severity: Major
                      Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js - About 50 mins to fix

                        Function $get has 7 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                function ($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) {
                        Severity: Major
                        Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js - About 50 mins to fix

                          Function $get has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  function ($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) {
                          Severity: Major
                          Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 50 mins to fix

                            Function $get has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              this.$get = [ '$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', function ( $window, $compile, $timeout, $parse, $document, $position, $interpolate ) {
                            Severity: Major
                            Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 50 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if ( !(unmatched[i] || setMatched[i]) ) {
                                                              setMatched[i] = pop.call( results );
                                                          }
                              Severity: Major
                              Found in app/lib/jquery/jquery.js - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language