Preparing report...

Report for github.com/cloudsonic/sonic-server

A+    Excellent!    Found 140 issues across 252 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint44%

Golint is a linter for Go source code.

    • sonic-server/core/auth/auth.go
    • Line 18: warning: exported var Secret should have comment or be unexported (golint)
    • Line 22: warning: exported function Init should have comment or be unexported (golint)
    • Line 34: warning: exported function CreateToken should have comment or be unexported (golint)
    • Line 49: warning: exported function TouchToken should have comment or be unexported (golint)
    • Line 61: warning: exported function Validate should have comment or be unexported (golint)
    • sonic-server/utils/pool/pool.go
    • Line 9: warning: exported type Executor should have comment or be unexported (golint)
    • Line 11: warning: exported type Pool should have comment or be unexported (golint)
    • Line 23: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 65: warning: exported method Pool.Submit should have comment or be unexported (golint)
    • Line 70: warning: exported method Pool.Stop should have comment or be unexported (golint)
    • sonic-server/core/media_streamer.go
    • Line 21: warning: exported type MediaStreamer should have comment or be unexported (golint)
    • Line 25: warning: exported type TranscodingCache should have comment or be unexported (golint)
    • Line 27: warning: exported function NewMediaStreamer should have comment or be unexported (golint)
    • Line 105: warning: exported type Stream should have comment or be unexported (golint)
    • Line 114: warning: exported method Stream.Seekable should have comment or be unexported (golint)
    • Line 115: warning: exported method Stream.Duration should have comment or be unexported (golint)
    • Line 116: warning: exported method Stream.ContentType should have comment or be unexported (golint)
    • Line 117: warning: exported method Stream.Name should have comment or be unexported (golint)
    • Line 118: warning: exported method Stream.ModTime should have comment or be unexported (golint)
    • Line 119: warning: exported method Stream.EstimatedContentLength should have comment or be unexported (golint)
    • Line 174: warning: exported function GetTranscodingCache should have comment or be unexported (golint)
    • sonic-server/model/album.go
    • Line 5: warning: exported type Album should have comment or be unexported (golint)
    • Line 40: warning: exported type Albums should have comment or be unexported (golint)
    • Line 42: warning: exported type AlbumRepository should have comment or be unexported (golint)
    • Line 55: warning: exported method Album.GetAnnotations should have comment or be unexported (golint)
    • sonic-server/consts/consts.go
    • Line 11: warning: exported const AppName should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported const DefaultUILoginBackgroundURL should be of the form "DefaultUILoginBackgroundURL ..." (golint)
    • Line 57: warning: exported var DefaultTranscodings should have comment or be unexported (golint)
    • Line 74: warning: exported var VariousArtists should have comment or be unexported (golint)
    • sonic-server/conf/configuration.go
    • Line 86: warning: exported var Server should have comment or be unexported (golint)
    • Line 90: warning: exported function LoadFromFile should have comment or be unexported (golint)
    • Line 95: warning: exported function Load should have comment or be unexported (golint)
    • Line 216: warning: exported function InitConfig should have comment or be unexported (golint)
    • sonic-server/server/subsonic/system.go
    • Line 9: warning: exported type SystemController should have comment or be unexported (golint)
    • Line 11: warning: exported function NewSystemController should have comment or be unexported (golint)
    • Line 15: warning: exported method SystemController.Ping should have comment or be unexported (golint)
    • Line 19: warning: exported method SystemController.GetLicense should have comment or be unexported (golint)
    • sonic-server/core/artwork.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 11: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 28: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 31: warning: exported type Artwork should have comment or be unexported (golint)
    • Line 35: warning: exported type ArtworkCache should have comment or be unexported (golint)
    • Line 37: warning: exported function NewArtwork should have comment or be unexported (golint)
    • Line 207: warning: exported function GetImageCache should have comment or be unexported (golint)
    • sonic-server/log/log.go
    • Line 15: warning: exported type Level should have comment or be unexported (golint)
    • Line 17: warning: exported type LevelFunc should have comment or be unexported (golint)
    • Line 36: warning: exported const LevelCritical should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported function SetLevelString should have comment or be unexported (golint)
    • Line 80: warning: exported function SetLogSourceLine should have comment or be unexported (golint)
    • Line 84: warning: exported function SetRedacting should have comment or be unexported (golint)
    • Line 96: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 107: warning: exported function SetDefaultLogger should have comment or be unexported (golint)
    • Line 111: warning: exported function CurrentLevel should have comment or be unexported (golint)
    • Line 115: warning: exported function Error should have comment or be unexported (golint)
    • Line 123: warning: exported function Warn should have comment or be unexported (golint)
    • Line 131: warning: exported function Info should have comment or be unexported (golint)
    • Line 139: warning: exported function Debug should have comment or be unexported (golint)
    • Line 147: warning: exported function Trace should have comment or be unexported (golint)
    • sonic-server/server/server.go
    • Line 18: warning: exported type Handler should have comment or be unexported (golint)
    • Line 23: warning: exported type Server should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • Line 37: warning: exported method Server.MountRouter should have comment or be unexported (golint)
    • Line 46: warning: exported method Server.Run should have comment or be unexported (golint)
    • sonic-server/model/user.go
    • Line 5: warning: exported type User should have comment or be unexported (golint)
    • Line 25: warning: exported type Users should have comment or be unexported (golint)
    • Line 27: warning: exported type UserRepository should have comment or be unexported (golint)
    • sonic-server/server/subsonic/media_retrieval.go
    • Line 18: warning: exported type MediaRetrievalController should have comment or be unexported (golint)
    • Line 23: warning: exported function NewMediaRetrievalController should have comment or be unexported (golint)
    • Line 27: warning: exported method MediaRetrievalController.GetAvatar should have comment or be unexported (golint)
    • Line 60: warning: exported method MediaRetrievalController.GetCoverArt should have comment or be unexported (golint)
    • sonic-server/model/request/request.go
    • Line 12: warning: exported const User should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function WithUser should have comment or be unexported (golint)
    • Line 24: warning: exported function WithUsername should have comment or be unexported (golint)
    • Line 28: warning: exported function WithClient should have comment or be unexported (golint)
    • Line 32: warning: exported function WithVersion should have comment or be unexported (golint)
    • Line 36: warning: exported function WithPlayer should have comment or be unexported (golint)
    • Line 40: warning: exported function WithTranscoding should have comment or be unexported (golint)
    • Line 44: warning: exported function UserFrom should have comment or be unexported (golint)
    • Line 49: warning: exported function UsernameFrom should have comment or be unexported (golint)
    • Line 54: warning: exported function ClientFrom should have comment or be unexported (golint)
    • Line 59: warning: exported function VersionFrom should have comment or be unexported (golint)
    • Line 64: warning: exported function PlayerFrom should have comment or be unexported (golint)
    • Line 69: warning: exported function TranscodingFrom should have comment or be unexported (golint)
    • sonic-server/model/mediafolder.go
    • Line 3: warning: exported type MediaFolder should have comment or be unexported (golint)
    • Line 9: warning: exported type MediaFolders should have comment or be unexported (golint)
    • Line 11: warning: exported type MediaFolderRepository should have comment or be unexported (golint)
    • sonic-server/tests/mock_artist_repo.go
    • Line 9: warning: exported function CreateMockArtistRepo should have comment or be unexported (golint)
    • Line 13: warning: exported type MockArtist should have comment or be unexported (golint)
    • Line 19: warning: exported method MockArtist.SetError should have comment or be unexported (golint)
    • Line 23: warning: exported method MockArtist.SetData should have comment or be unexported (golint)
    • Line 30: warning: exported method MockArtist.Exists should have comment or be unexported (golint)
    • Line 38: warning: exported method MockArtist.Get should have comment or be unexported (golint)
    • sonic-server/model/properties.go
    • Line 4: warning: exported const PropLastScan should have comment (or a comment on this block) or be unexported (golint)
    • Line 7: warning: exported type Property should have comment or be unexported (golint)
    • Line 12: warning: exported type PropertyRepository should have comment or be unexported (golint)
    • sonic-server/tests/mock_user_repo.go
    • Line 10: warning: exported function CreateMockUserRepo should have comment or be unexported (golint)
    • Line 16: warning: exported type MockedUserRepo should have comment or be unexported (golint)
    • Line 22: warning: exported method MockedUserRepo.CountAll should have comment or be unexported (golint)
    • Line 29: warning: exported method MockedUserRepo.Put should have comment or be unexported (golint)
    • Line 41: warning: exported method MockedUserRepo.FindByUsername should have comment or be unexported (golint)
    • Line 52: warning: exported method MockedUserRepo.UpdateLastLoginAt should have comment or be unexported (golint)
    • sonic-server/utils/files.go
    • Line 14: warning: exported function IsAudioFile should have comment or be unexported (golint)
    • Line 20: warning: exported function IsImageFile should have comment or be unexported (golint)
    • Line 25: warning: exported function IsPlaylist should have comment or be unexported (golint)
    • sonic-server/server/events/events.go
    • Line 11: warning: exported type Event should have comment or be unexported (golint)
    • Line 26: warning: exported type ScanStatus should have comment or be unexported (golint)
    • Line 33: warning: exported type KeepAlive should have comment or be unexported (golint)
    • Line 38: warning: exported type ServerStart should have comment or be unexported (golint)
    • sonic-server/tests/mock_persistence.go
    • Line 9: warning: exported type MockDataStore should have comment or be unexported (golint)
    • Line 20: warning: exported method MockDataStore.Album should have comment or be unexported (golint)
    • Line 27: warning: exported method MockDataStore.Artist should have comment or be unexported (golint)
    • Line 34: warning: exported method MockDataStore.MediaFile should have comment or be unexported (golint)
    • Line 41: warning: exported method MockDataStore.MediaFolder should have comment or be unexported (golint)
    • Line 45: warning: exported method MockDataStore.Genre should have comment or be unexported (golint)
    • Line 52: warning: exported method MockDataStore.Playlist should have comment or be unexported (golint)
    • Line 56: warning: exported method MockDataStore.PlayQueue should have comment or be unexported (golint)
    • Line 60: warning: exported method MockDataStore.Property should have comment or be unexported (golint)
    • Line 67: warning: exported method MockDataStore.User should have comment or be unexported (golint)
    • Line 74: warning: exported method MockDataStore.Transcoding should have comment or be unexported (golint)
    • Line 81: warning: exported method MockDataStore.Player should have comment or be unexported (golint)
    • Line 88: warning: exported method MockDataStore.WithTx should have comment or be unexported (golint)
    • Line 92: warning: exported method MockDataStore.Resource should have comment or be unexported (golint)
    • Line 96: warning: exported method MockDataStore.GC should have comment or be unexported (golint)
    • sonic-server/persistence/persistence.go
    • Line 13: warning: exported type SQLStore should have comment or be unexported (golint)
    • Line 17: warning: exported function New should have comment or be unexported (golint)
    • Line 21: warning: exported method SQLStore.Album should have comment or be unexported (golint)
    • Line 25: warning: exported method SQLStore.Artist should have comment or be unexported (golint)
    • Line 29: warning: exported method SQLStore.MediaFile should have comment or be unexported (golint)
    • Line 33: warning: exported method SQLStore.MediaFolder should have comment or be unexported (golint)
    • Line 37: warning: exported method SQLStore.Genre should have comment or be unexported (golint)
    • Line 41: warning: exported method SQLStore.PlayQueue should have comment or be unexported (golint)
    • Line 45: warning: exported method SQLStore.Playlist should have comment or be unexported (golint)
    • Line 49: warning: exported method SQLStore.Property should have comment or be unexported (golint)
    • Line 53: warning: exported method SQLStore.User should have comment or be unexported (golint)
    • Line 57: warning: exported method SQLStore.Transcoding should have comment or be unexported (golint)
    • Line 61: warning: exported method SQLStore.Player should have comment or be unexported (golint)
    • Line 65: warning: exported method SQLStore.Resource should have comment or be unexported (golint)
    • Line 86: warning: exported method SQLStore.WithTx should have comment or be unexported (golint)
    • Line 114: warning: exported method SQLStore.GC should have comment or be unexported (golint)
    • sonic-server/server/subsonic/album_lists.go
    • Line 17: warning: exported type AlbumListController should have comment or be unexported (golint)
    • Line 22: warning: exported function NewAlbumListController should have comment or be unexported (golint)
    • Line 75: warning: exported method AlbumListController.GetAlbumList should have comment or be unexported (golint)
    • Line 86: warning: exported method AlbumListController.GetAlbumList2 should have comment or be unexported (golint)
    • Line 97: warning: exported method AlbumListController.GetStarred should have comment or be unexported (golint)
    • Line 124: warning: exported method AlbumListController.GetStarred2 should have comment or be unexported (golint)
    • Line 135: warning: exported method AlbumListController.GetNowPlaying should have comment or be unexported (golint)
    • Line 161: warning: exported method AlbumListController.GetRandomSongs should have comment or be unexported (golint)
    • Line 179: warning: exported method AlbumListController.GetSongsByGenre should have comment or be unexported (golint)
    • sonic-server/model/playqueue.go
    • Line 7: warning: exported type PlayQueue should have comment or be unexported (golint)
    • Line 18: warning: exported type PlayQueues should have comment or be unexported (golint)
    • Line 20: warning: exported type PlayQueueRepository should have comment or be unexported (golint)
    • sonic-server/core/agents/interfaces.go
    • Line 8: warning: exported type Constructor should have comment or be unexported (golint)
    • Line 10: warning: exported type Interface should have comment or be unexported (golint)
    • Line 14: warning: exported type Artist should have comment or be unexported (golint)
    • Line 19: warning: exported type ArtistImage should have comment or be unexported (golint)
    • Line 24: warning: exported type Song should have comment or be unexported (golint)
    • Line 30: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 33: warning: exported type ArtistMBIDRetriever should have comment or be unexported (golint)
    • Line 37: warning: exported type ArtistURLRetriever should have comment or be unexported (golint)
    • Line 41: warning: exported type ArtistBiographyRetriever should have comment or be unexported (golint)
    • Line 45: warning: exported type ArtistSimilarRetriever should have comment or be unexported (golint)
    • Line 49: warning: exported type ArtistImageRetriever should have comment or be unexported (golint)
    • Line 53: warning: exported type ArtistTopSongsRetriever should have comment or be unexported (golint)
    • Line 57: warning: exported var Map should have comment or be unexported (golint)
    • Line 59: warning: exported function Register should have comment or be unexported (golint)
    • sonic-server/server/subsonic/filter/filters.go
    • Line 10: warning: exported type Options should have comment or be unexported (golint)
    • Line 12: warning: exported function AlbumsByNewest should have comment or be unexported (golint)
    • Line 16: warning: exported function AlbumsByRecent should have comment or be unexported (golint)
    • Line 20: warning: exported function AlbumsByFrequent should have comment or be unexported (golint)
    • Line 24: warning: exported function AlbumsByRandom should have comment or be unexported (golint)
    • Line 28: warning: exported function AlbumsByName should have comment or be unexported (golint)
    • Line 32: warning: exported function AlbumsByArtist should have comment or be unexported (golint)
    • Line 36: warning: exported function AlbumsByStarred should have comment or be unexported (golint)
    • Line 40: warning: exported function AlbumsByRating should have comment or be unexported (golint)
    • Line 44: warning: exported function AlbumsByGenre should have comment or be unexported (golint)
    • Line 51: warning: exported function AlbumsByYear should have comment or be unexported (golint)
    • Line 72: warning: exported function SongsByGenre should have comment or be unexported (golint)
    • Line 79: warning: exported function SongsByRandom should have comment or be unexported (golint)
    • sonic-server/scanner/metadata/metadata.go
    • Line 18: warning: exported type Extractor should have comment or be unexported (golint)
    • Line 22: warning: exported function Extract should have comment or be unexported (golint)
    • Line 38: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 137: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sonic-server/model/artist.go
    • Line 5: warning: exported type Artist should have comment or be unexported (golint)
    • Line 26: warning: exported method Artist.ArtistImageUrl should have comment or be unexported (golint)
    • Line 36: warning: exported type Artists should have comment or be unexported (golint)
    • Line 38: warning: exported type ArtistIndex should have comment or be unexported (golint)
    • Line 42: warning: exported type ArtistIndexes should have comment or be unexported (golint)
    • Line 44: warning: exported type ArtistRepository should have comment or be unexported (golint)
    • Line 57: warning: exported method Artist.GetAnnotations should have comment or be unexported (golint)
    • sonic-server/server/subsonic/playlists.go
    • Line 15: warning: exported type PlaylistsController should have comment or be unexported (golint)
    • Line 19: warning: exported function NewPlaylistsController should have comment or be unexported (golint)
    • Line 23: warning: exported method PlaylistsController.GetPlaylists should have comment or be unexported (golint)
    • Line 39: warning: exported method PlaylistsController.GetPlaylist should have comment or be unexported (golint)
    • Line 97: warning: exported method PlaylistsController.CreatePlaylist should have comment or be unexported (golint)
    • Line 128: warning: exported method PlaylistsController.DeletePlaylist should have comment or be unexported (golint)
    • Line 183: warning: exported method PlaylistsController.UpdatePlaylist should have comment or be unexported (golint)
    • sonic-server/model/playlist.go
    • Line 7: warning: exported type Playlist should have comment or be unexported (golint)
    • Line 23: warning: exported type Playlists should have comment or be unexported (golint)
    • Line 25: warning: exported type PlaylistRepository should have comment or be unexported (golint)
    • Line 36: warning: exported type PlaylistTrack should have comment or be unexported (golint)
    • Line 43: warning: exported type PlaylistTracks should have comment or be unexported (golint)
    • Line 45: warning: exported type PlaylistTrackRepository should have comment or be unexported (golint)
    • sonic-server/server/subsonic/browsing.go
    • Line 19: warning: exported type BrowsingController should have comment or be unexported (golint)
    • Line 24: warning: exported function NewBrowsingController should have comment or be unexported (golint)
    • Line 28: warning: exported method BrowsingController.GetMusicFolders should have comment or be unexported (golint)
    • Line 77: warning: exported method BrowsingController.GetIndexes should have comment or be unexported (golint)
    • Line 91: warning: exported method BrowsingController.GetArtists should have comment or be unexported (golint)
    • Line 103: warning: exported method BrowsingController.GetMusicDirectory should have comment or be unexported (golint)
    • Line 139: warning: exported method BrowsingController.GetArtist should have comment or be unexported (golint)
    • Line 164: warning: exported method BrowsingController.GetAlbum should have comment or be unexported (golint)
    • Line 189: warning: exported method BrowsingController.GetSong should have comment or be unexported (golint)
    • Line 209: warning: exported method BrowsingController.GetGenres should have comment or be unexported (golint)
    • Line 230: warning: exported method BrowsingController.GetArtistInfo should have comment or be unexported (golint)
    • Line 259: warning: exported method BrowsingController.GetArtistInfo2 should have comment or be unexported (golint)
    • Line 280: warning: exported method BrowsingController.GetSimilarSongs should have comment or be unexported (golint)
    • Line 300: warning: exported method BrowsingController.GetSimilarSongs2 should have comment or be unexported (golint)
    • Line 313: warning: exported method BrowsingController.GetTopSongs should have comment or be unexported (golint)
    • sonic-server/server/subsonic/stream.go
    • Line 20: warning: exported type StreamController should have comment or be unexported (golint)
    • Line 26: warning: exported function NewStreamController should have comment or be unexported (golint)
    • Line 30: warning: exported method StreamController.Stream should have comment or be unexported (golint)
    • Line 83: warning: exported method StreamController.Download should have comment or be unexported (golint)
    • sonic-server/utils/lastfm/client.go
    • Line 17: warning: exported type Error should have comment or be unexported (golint)
    • Line 30: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 34: warning: exported type Client should have comment or be unexported (golint)
    • Line 76: warning: exported method Client.ArtistGetInfo should have comment or be unexported (golint)
    • Line 89: warning: exported method Client.ArtistGetSimilar should have comment or be unexported (golint)
    • Line 102: warning: exported method Client.ArtistGetTopTracks should have comment or be unexported (golint)
    • sonic-server/model/mediafile.go
    • Line 8: warning: exported type MediaFile should have comment or be unexported (golint)
    • Line 54: warning: exported method MediaFile.ContentType should have comment or be unexported (golint)
    • Line 58: warning: exported type MediaFiles should have comment or be unexported (golint)
    • Line 60: warning: exported type MediaFileRepository should have comment or be unexported (golint)
    • Line 80: warning: exported method MediaFile.GetAnnotations should have comment or be unexported (golint)
    • sonic-server/tests/mock_album_repo.go
    • Line 9: warning: exported function CreateMockAlbumRepo should have comment or be unexported (golint)
    • Line 13: warning: exported type MockAlbum should have comment or be unexported (golint)
    • Line 21: warning: exported method MockAlbum.SetError should have comment or be unexported (golint)
    • Line 25: warning: exported method MockAlbum.SetData should have comment or be unexported (golint)
    • Line 33: warning: exported method MockAlbum.Exists should have comment or be unexported (golint)
    • Line 41: warning: exported method MockAlbum.Get should have comment or be unexported (golint)
    • Line 51: warning: exported method MockAlbum.GetAll should have comment or be unexported (golint)
    • Line 61: warning: exported method MockAlbum.FindByArtist should have comment or be unexported (golint)
    • sonic-server/tests/mock_mediafile_repo.go
    • Line 9: warning: exported function CreateMockMediaFileRepo should have comment or be unexported (golint)
    • Line 13: warning: exported type MockMediaFile should have comment or be unexported (golint)
    • Line 19: warning: exported method MockMediaFile.SetError should have comment or be unexported (golint)
    • Line 23: warning: exported method MockMediaFile.SetData should have comment or be unexported (golint)
    • Line 30: warning: exported method MockMediaFile.Exists should have comment or be unexported (golint)
    • Line 38: warning: exported method MockMediaFile.Get should have comment or be unexported (golint)
    • Line 48: warning: exported method MockMediaFile.FindByAlbum should have comment or be unexported (golint)
    • sonic-server/server/app/auth.go
    • Line 25: warning: exported var ErrFirstTime should have comment or be unexported (golint)
    • Line 28: warning: exported function Login should have comment or be unexported (golint)
    • Line 87: warning: exported function CreateAdmin should have comment or be unexported (golint)
    • Line 158: warning: context.Context should be the first parameter of a function (golint)
    • sonic-server/server/subsonic/library_scanning.go
    • Line 15: warning: exported type LibraryScanningController should have comment or be unexported (golint)
    • Line 19: warning: exported function NewLibraryScanningController should have comment or be unexported (golint)
    • Line 23: warning: exported method LibraryScanningController.GetScanStatus should have comment or be unexported (golint)
    • Line 42: warning: exported method LibraryScanningController.StartScan should have comment or be unexported (golint)
    • sonic-server/core/agents/cached_http_client.go
    • Line 20: warning: exported type CachedHTTPClient should have comment or be unexported (golint)
    • Line 36: warning: exported function NewCachedHTTPClient should have comment or be unexported (golint)
    • Line 58: warning: exported method CachedHTTPClient.Do should have comment or be unexported (golint)
    • sonic-server/utils/lastfm/responses.go
    • Line 3: warning: exported type Response should have comment or be unexported (golint)
    • Line 11: warning: exported type Artist should have comment or be unexported (golint)
    • Line 28: warning: exported type SimilarArtists should have comment or be unexported (golint)
    • Line 33: warning: exported type Attr should have comment or be unexported (golint)
    • Line 37: warning: exported type ArtistImage should have comment or be unexported (golint)
    • Line 42: warning: exported type ArtistTag should have comment or be unexported (golint)
    • Line 47: warning: exported type ArtistBio should have comment or be unexported (golint)
    • Line 53: warning: exported type Track should have comment or be unexported (golint)
    • Line 58: warning: exported type TopTracks should have comment or be unexported (golint)
    • sonic-server/scanner/scanner.go
    • Line 18: warning: exported type Scanner should have comment or be unexported (golint)
    • Line 24: warning: exported type StatusInfo should have comment or be unexported (golint)
    • Line 33: warning: exported var ErrAlreadyScanning should have comment or be unexported (golint)
    • Line 37: warning: exported type FolderScanner should have comment or be unexported (golint)
    • Line 60: warning: exported function New should have comment or be unexported (golint)
    • sonic-server/scanner/tag_scanner.go
    • Line 20: warning: exported type TagScanner should have comment or be unexported (golint)
    • Line 29: warning: exported function NewTagScanner should have comment or be unexported (golint)
    • Line 54: warning: comment on exported method TagScanner.Scan should be of the form "Scan ..." (golint)
    • sonic-server/utils/spotify/responses.go
    • Line 3: warning: exported type SearchResults should have comment or be unexported (golint)
    • Line 7: warning: exported type ArtistsResult should have comment or be unexported (golint)
    • Line 12: warning: exported type Artist should have comment or be unexported (golint)
    • Line 21: warning: exported type Image should have comment or be unexported (golint)
    • Line 27: warning: exported type Error should have comment or be unexported (golint)
    • sonic-server/server/subsonic/users.go
    • Line 10: warning: exported type UsersController should have comment or be unexported (golint)
    • Line 12: warning: exported function NewUsersController should have comment or be unexported (golint)
    • Line 16: warning: comment on exported method UsersController.GetUser should be of the form "GetUser ..." (golint)
    • Line 33: warning: exported method UsersController.GetUsers should have comment or be unexported (golint)
    • sonic-server/model/annotation.go
    • Line 5: warning: exported type Annotations should have comment or be unexported (golint)
    • Line 13: warning: exported type AnnotatedModel should have comment or be unexported (golint)
    • Line 17: warning: exported type AnnotatedRepository should have comment or be unexported (golint)
    • Line 23: warning: comment on exported var AnnotationFields should be of the form "AnnotationFields ..." (golint)
    • sonic-server/utils/time.go
    • Line 5: warning: exported function ToTime should have comment or be unexported (golint)
    • Line 10: warning: exported function ToMillis should have comment or be unexported (golint)
    • sonic-server/server/subsonic/bookmarks.go
    • Line 13: warning: exported type BookmarksController should have comment or be unexported (golint)
    • Line 17: warning: exported function NewBookmarksController should have comment or be unexported (golint)
    • Line 21: warning: exported method BookmarksController.GetBookmarks should have comment or be unexported (golint)
    • Line 46: warning: exported method BookmarksController.CreateBookmark should have comment or be unexported (golint)
    • Line 63: warning: exported method BookmarksController.DeleteBookmark should have comment or be unexported (golint)
    • Line 77: warning: exported method BookmarksController.GetPlayQueue should have comment or be unexported (golint)
    • Line 98: warning: exported method BookmarksController.SavePlayQueue should have comment or be unexported (golint)
    • sonic-server/model/transcoding.go
    • Line 3: warning: exported type Transcoding should have comment or be unexported (golint)
    • Line 11: warning: exported type Transcodings should have comment or be unexported (golint)
    • Line 13: warning: exported type TranscodingRepository should have comment or be unexported (golint)
    • sonic-server/server/app/app.go
    • Line 19: warning: exported type Router should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported method Router.Setup should have comment or be unexported (golint)
    • Line 86: warning: exported method Router.R should have comment or be unexported (golint)
    • Line 93: warning: exported method Router.RX should have comment or be unexported (golint)
    • sonic-server/core/common.go
    • Line 12: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • sonic-server/utils/ints.go
    • Line 3: warning: exported function MinInt should have comment or be unexported (golint)
    • Line 10: warning: exported function MaxInt should have comment or be unexported (golint)
    • Line 17: warning: exported function IntInSlice should have comment or be unexported (golint)
    • sonic-server/server/subsonic/api.go
    • Line 21: warning: exported const Version should have comment or be unexported (golint)
    • Line 25: warning: exported type Router should have comment or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • Line 52: warning: exported method Router.Setup should have comment or be unexported (golint)
    • sonic-server/tests/mock_transcoding_repo.go
    • Line 5: warning: exported type MockTranscodingRepository should have comment or be unexported (golint)
    • Line 9: warning: exported method MockTranscodingRepository.Get should have comment or be unexported (golint)
    • Line 13: warning: exported method MockTranscodingRepository.FindByFormat should have comment or be unexported (golint)
    • sonic-server/persistence/sql_base_repository.go
    • Line 9: warning: should not use dot imports (golint)
    • Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • sonic-server/utils/atomic.go
    • Line 5: warning: exported type AtomicBool should have comment or be unexported (golint)
    • Line 7: warning: exported method AtomicBool.Get should have comment or be unexported (golint)
    • Line 11: warning: exported method AtomicBool.Set should have comment or be unexported (golint)
    • sonic-server/server/subsonic/searching.go
    • Line 15: warning: exported type SearchingController should have comment or be unexported (golint)
    • Line 29: warning: exported function NewSearchingController should have comment or be unexported (golint)
    • Line 71: warning: exported method SearchingController.Search2 should have comment or be unexported (golint)
    • Line 98: warning: exported method SearchingController.Search3 should have comment or be unexported (golint)
    • sonic-server/db/migration/20200608153717_referential_integrity.go
    • Line 13: warning: exported function Up20200608153717 should have comment or be unexported (golint)
    • Line 51: warning: don't use underscores in Go names; func updatePlayer_20200608153717 should be updatePlayer20200608153717 (golint)
    • Line 79: warning: don't use underscores in Go names; func updatePlaylist_20200608153717 should be updatePlaylist20200608153717 (golint)
    • Line 110: warning: don't use underscores in Go names; func updatePlaylistTracks_20200608153717 should be updatePlaylistTracks20200608153717 (golint)
    • Line 135: warning: exported function Down20200608153717 should have comment or be unexported (golint)
    • sonic-server/utils/cache/file_caches.go
    • Line 18: warning: exported type Item should have comment or be unexported (golint)
    • Line 22: warning: exported type ReadFunc should have comment or be unexported (golint)
    • Line 24: warning: exported type FileCache should have comment or be unexported (golint)
    • Line 30: warning: exported function NewFileCache should have comment or be unexported (golint)
    • Line 126: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 135: warning: exported type CachedStream should have comment or be unexported (golint)
    • Line 141: warning: exported method CachedStream.Seekable should have comment or be unexported (golint)
    • Line 142: warning: exported method CachedStream.Close should have comment or be unexported (golint)
    • sonic-server/utils/request_helpers.go
    • Line 10: warning: exported function ParamString should have comment or be unexported (golint)
    • Line 14: warning: exported function ParamStringDefault should have comment or be unexported (golint)
    • Line 22: warning: exported function ParamStrings should have comment or be unexported (golint)
    • Line 26: warning: exported function ParamTimes should have comment or be unexported (golint)
    • Line 38: warning: exported function ParamTime should have comment or be unexported (golint)
    • Line 50: warning: exported function ParamInt should have comment or be unexported (golint)
    • Line 62: warning: exported function ParamInt64 should have comment or be unexported (golint)
    • Line 74: warning: exported function ParamInts should have comment or be unexported (golint)
    • Line 86: warning: exported function ParamBool should have comment or be unexported (golint)
    • sonic-server/model/player.go
    • Line 7: warning: exported type Player should have comment or be unexported (golint)
    • Line 20: warning: exported type Players should have comment or be unexported (golint)
    • Line 22: warning: exported type PlayerRepository should have comment or be unexported (golint)
    • sonic-server/utils/strings.go
    • Line 9: warning: exported function NoArticle should have comment or be unexported (golint)
    • Line 20: warning: exported function StringInSlice should have comment or be unexported (golint)
    • Line 29: warning: exported function InsertString should have comment or be unexported (golint)
    • Line 33: warning: exported function RemoveString should have comment or be unexported (golint)
    • Line 37: warning: exported function MoveString should have comment or be unexported (golint)
    • Line 42: warning: exported function BreakUpStringSlice should have comment or be unexported (golint)
    • Line 56: warning: exported function LongestCommonPrefix should have comment or be unexported (golint)
    • sonic-server/db/db.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 11: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 17: warning: exported var Driver should have comment or be unexported (golint)
    • Line 26: warning: exported function Db should have comment or be unexported (golint)
    • Line 43: warning: exported function EnsureLatestVersion should have comment or be unexported (golint)
    • sonic-server/model/genres.go
    • Line 3: warning: exported type Genre should have comment or be unexported (golint)
    • Line 9: warning: exported type Genres should have comment or be unexported (golint)
    • Line 11: warning: exported type GenreRepository should have comment or be unexported (golint)
    • sonic-server/server/subsonic/responses/responses.go
    • Line 8: warning: exported type Subsonic should have comment or be unexported (golint)
    • Line 51: warning: exported type JsonWrapper should have comment or be unexported (golint)
    • Line 55: warning: exported type Error should have comment or be unexported (golint)
    • Line 60: warning: exported type License should have comment or be unexported (golint)
    • Line 64: warning: exported type MusicFolder should have comment or be unexported (golint)
    • Line 69: warning: exported type MusicFolders should have comment or be unexported (golint)
    • Line 73: warning: exported type Artist should have comment or be unexported (golint)
    • Line 85: warning: exported type Index should have comment or be unexported (golint)
    • Line 90: warning: exported type Indexes should have comment or be unexported (golint)
    • Line 96: warning: exported type Child should have comment or be unexported (golint)
    • Line 132: warning: exported type Songs should have comment or be unexported (golint)
    • Line 136: warning: exported type Directory should have comment or be unexported (golint)
    • Line 161: warning: exported type ArtistID3 should have comment or be unexported (golint)
    • Line 170: warning: exported type AlbumID3 should have comment or be unexported (golint)
    • Line 185: warning: exported type ArtistWithAlbumsID3 should have comment or be unexported (golint)
    • Line 190: warning: exported type AlbumWithSongsID3 should have comment or be unexported (golint)
    • Line 195: warning: exported type AlbumList should have comment or be unexported (golint)
    • Line 199: warning: exported type Playlist should have comment or be unexported (golint)
    • Line 217: warning: exported type Playlists should have comment or be unexported (golint)
    • Line 221: warning: exported type PlaylistWithSongs should have comment or be unexported (golint)
    • Line 226: warning: exported type SearchResult2 should have comment or be unexported (golint)
    • Line 232: warning: exported type SearchResult3 should have comment or be unexported (golint)
    • Line 238: warning: exported type Starred should have comment or be unexported (golint)
    • Line 244: warning: exported type NowPlayingEntry should have comment or be unexported (golint)
    • Line 252: warning: exported type NowPlaying should have comment or be unexported (golint)
    • Line 256: warning: exported type User should have comment or be unexported (golint)
    • Line 276: warning: exported type Users should have comment or be unexported (golint)
    • Line 280: warning: exported type Genre should have comment or be unexported (golint)
    • Line 286: warning: exported type Genres should have comment or be unexported (golint)
    • Line 290: warning: exported type ArtistInfoBase should have comment or be unexported (golint)
    • Line 299: warning: exported type ArtistInfo should have comment or be unexported (golint)
    • Line 304: warning: exported type ArtistInfo2 should have comment or be unexported (golint)
    • Line 309: warning: exported type SimilarSongs should have comment or be unexported (golint)
    • Line 313: warning: exported type SimilarSongs2 should have comment or be unexported (golint)
    • Line 317: warning: exported type TopSongs should have comment or be unexported (golint)
    • Line 321: warning: exported type PlayQueue should have comment or be unexported (golint)
    • Line 330: warning: exported type Bookmark should have comment or be unexported (golint)
    • Line 339: warning: exported type Bookmarks should have comment or be unexported (golint)
    • Line 343: warning: exported type ScanStatus should have comment or be unexported (golint)
    • sonic-server/core/nowplaying.go
    • Line 9: warning: exported const NowPlayingExpire should have comment or be unexported (golint)
    • Line 11: warning: exported type NowPlayingInfo should have comment or be unexported (golint)
    • Line 19: warning: comment on exported type NowPlaying should be of the form "NowPlaying ..." (with optional leading article) (golint)
    • Line 32: warning: exported function NewNowPlayingRepository should have comment or be unexported (golint)
    • sonic-server/model/bookmark.go
    • Line 5: warning: exported type Bookmarkable should have comment or be unexported (golint)
    • Line 9: warning: exported type BookmarkableRepository should have comment or be unexported (golint)
    • Line 15: warning: exported type Bookmark should have comment or be unexported (golint)
    • Line 24: warning: exported type Bookmarks should have comment or be unexported (golint)
    • Line 26: warning: comment on exported var BookmarkFields should be of the form "BookmarkFields ..." (golint)
    • sonic-server/model/datastore.go
    • Line 10: warning: exported type QueryOptions should have comment or be unexported (golint)
    • Line 18: warning: exported type ResourceRepository should have comment or be unexported (golint)
    • Line 22: warning: exported type DataStore should have comment or be unexported (golint)
    • sonic-server/server/events/sse.go
    • Line 1: warning: package comment should be of the form "Package events ..." (golint)
    • Line 18: warning: exported type Broker should have comment or be unexported (golint)
    • Line 62: warning: exported function NewBroker should have comment or be unexported (golint)
    • sonic-server/utils/spotify/client.go
    • Line 21: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 28: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 32: warning: exported type Client should have comment or be unexported (golint)
    • Line 38: warning: exported method Client.SearchArtists should have comment or be unexported (golint)
    • sonic-server/server/subsonic/media_annotation.go
    • Line 17: warning: exported type MediaAnnotationController should have comment or be unexported (golint)
    • Line 22: warning: exported function NewMediaAnnotationController should have comment or be unexported (golint)
    • Line 26: warning: exported method MediaAnnotationController.SetRating should have comment or be unexported (golint)
    • Line 70: warning: exported method MediaAnnotationController.Star should have comment or be unexported (golint)
    • Line 88: warning: exported method MediaAnnotationController.Unstar should have comment or be unexported (golint)
    • Line 106: warning: exported method MediaAnnotationController.Scrobble should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!