Darep/Beatstream

View on GitHub
app/assets/javascripts/songlist.js

Summary

Maintainability
D
1 day
Test Coverage

Function initializeSlickGrid has 248 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Songlist.prototype.initializeSlickGrid = function (events) {
        var initDone = false;

        var columns = [
            { id: 'np', resizable: false, width: 22 },
Severity: Major
Found in app/assets/javascripts/songlist.js - About 1 day to fix

    File songlist.js has 297 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    //= require jquery.cookie
    //= require lib/utils
    //= require lib/key_codes
    //= require lib/mediator
    //= require dragtooltip
    Severity: Minor
    Found in app/assets/javascripts/songlist.js - About 3 hrs to fix

      Function nextSong has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              grid.nextSong = function (shuffle, repeat, manual) {
                  var number_of_rows = grid.getDataLength();
                  var new_row = 0;
                  var current_row = -1;
      
      
      Severity: Minor
      Found in app/assets/javascripts/songlist.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                        if ((item.title && item.title.toLowerCase().indexOf(str) != -1) ||
                            (item.artist && item.artist.toLowerCase().indexOf(str) != -1) ||
                            (item.album && item.album.toLowerCase().indexOf(str) != -1))
                        {
                            match = true;
        Severity: Major
        Found in app/assets/javascripts/songlist.js - About 40 mins to fix

          There are no issues that match your filters.

          Category
          Status