arey/angular-musicbrainz

View on GitHub

Showing 290 of 632 total issues

Function dump has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

angular.mock.dump = function(object) {
  return serialize(object);

  function serialize(object) {
    var out;
Severity: Minor
Found in app/lib/angular-mocks/angular-mocks.js - About 1 hr to fix

    Function select has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function select( selector, context, results, seed ) {
        var i, tokens, token, type, find,
            match = tokenize( selector );
    
        if ( !seed ) {
    Severity: Minor
    Found in app/lib/jquery/jquery.js - About 1 hr to fix

      Function matcherFromTokens has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function matcherFromTokens( tokens ) {
          var checkContext, matcher, j,
              len = tokens.length,
              leadingRelative = Expr.relative[ tokens[0].type ],
              implicitRelative = leadingRelative || Expr.relative[" "],
      Severity: Minor
      Found in app/lib/jquery/jquery.js - About 1 hr to fix

        Function slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Carousel.prototype.slide = function (type, next) {
            var $active   = this.$element.find('.item.active')
            var $next     = next || $active[type]()
            var isCycling = this.interval
            var direction = type == 'next' ? 'left' : 'right'
        Severity: Minor
        Found in app/lib/bootstrap/dist/js/bootstrap.js - About 1 hr to fix

          Function slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            Carousel.prototype.slide = function (type, next) {
              var $active   = this.$element.find('.item.active')
              var $next     = next || $active[type]()
              var isCycling = this.interval
              var direction = type == 'next' ? 'left' : 'right'
          Severity: Minor
          Found in app/lib/bootstrap/js/carousel.js - About 1 hr to fix

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

                  setUrlParams: function(config, params, actionUrl) {
                    var self = this,
                        url = actionUrl || self.template,
                        val,
                        encodedVal;
            Severity: Minor
            Found in app/lib/angular-resource/angular-resource.js - About 1 hr to fix

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

              jQuery.attr = function( elem, name, value, pass ) {
                  var lowerName = name.toLowerCase(),
                      nType = elem && elem.nodeType;
              
                  if ( pass ) {
              Severity: Minor
              Found in app/lib/jquery/jquery-migrate.js - About 1 hr to fix

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

                function htmlSanitizeWriter(buf, uriValidator){
                  var ignore = false;
                  var out = angular.bind(buf, buf.push);
                  return {
                    start: function(tag, attrs, unary){
                Severity: Minor
                Found in app/lib/angular-sanitize/angular-sanitize.js - About 1 hr to fix

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

                        paginationCtrl.getPages = function(currentPage, totalPages) {
                          var pages = [];
                  
                          // Default page limits
                          var startPage = 1, endPage = totalPages;
                  Severity: Minor
                  Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

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

                          paginationCtrl.getPages = function(currentPage, totalPages) {
                            var pages = [];
                    
                            // Default page limits
                            var startPage = 1, endPage = totalPages;
                    Severity: Minor
                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js - About 1 hr to fix

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

                            createNew: function () {
                              var stack = [];
                      
                              return {
                                add: function (key, value) {
                      Severity: Minor
                      Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js - About 1 hr to fix

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

                              createNew: function () {
                                var stack = [];
                        
                                return {
                                  add: function (key, value) {
                        Severity: Minor
                        Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                            "pluralCat": function (n) {  if (n == 1) {   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 != 1 && (n % 10 == 0 || n % 10 == 1) || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 12 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
                          Severity: Critical
                          Found in app/lib/angular-i18n/angular-locale_pl.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                              "pluralCat": function (n) {  if (n == 1) {   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 != 1 && (n % 10 == 0 || n % 10 == 1) || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 12 && n % 100 <= 14) {   return PLURAL_CATEGORY.MANY;  }  return PLURAL_CATEGORY.OTHER;}
                            Severity: Critical
                            Found in app/lib/angular-i18n/angular-locale_pl-pl.js - About 1 hr to fix

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

                                          'autocomplete': function (text) {
                                              return es.search({
                                                  index: 'musicalbum',
                                                  type: 'album',
                                                  body: {
                              Severity: Minor
                              Found in app/js/services.js - About 1 hr to fix

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

                                  self.select = function(nextSlide, direction) {
                                    var nextIndex = slides.indexOf(nextSlide);
                                    //Decide direction if it's not given
                                    if (direction === undefined) {
                                      direction = nextIndex > currentIndex ? "next" : "prev";
                                Severity: Minor
                                Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js - About 1 hr to fix

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

                                    self.select = function(nextSlide, direction) {
                                      var nextIndex = slides.indexOf(nextSlide);
                                      //Decide direction if it's not given
                                      if (direction === undefined) {
                                        direction = nextIndex > currentIndex ? "next" : "prev";
                                  Severity: Minor
                                  Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

                                    Function stop has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        stop: function( type, clearQueue, gotoEnd ) {
                                            var stopQueue = function( hooks ) {
                                                var stop = hooks.stop;
                                                delete hooks.stop;
                                                stop( gotoEnd );
                                    Severity: Minor
                                    Found in app/lib/jquery/jquery.js - About 1 hr to fix

                                      Function extend has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      jQuery.extend = jQuery.fn.extend = function() {
                                          var options, name, src, copy, copyIsArray, clone,
                                              target = arguments[0] || {},
                                              i = 1,
                                              length = arguments.length,
                                      Severity: Minor
                                      Found in app/lib/jquery/jquery.js - About 1 hr to fix

                                        Function val has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            val: function( value ) {
                                                var hooks, ret, isFunction,
                                                    elem = this[0];
                                        
                                                if ( !arguments.length ) {
                                        Severity: Minor
                                        Found in app/lib/jquery/jquery.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language