Preparing report...

Report for github.com/cardigann/cardigann

A+    Excellent!    Found 23 issues across 36 files

Tweet

gofmt94%

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


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!


gocyclo91%

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.

    • cardigann/torznab/query.go
    • Line 157: warning: cyclomatic complexity 37 of function ParseQuery() is high (> 15) (gocyclo)
    • Line 70: warning: cyclomatic complexity 19 of function (Query).Encode() is high (> 15) (gocyclo)
    • cardigann/indexer/runner.go
    • Line 871: warning: cyclomatic complexity 39 of function (*Runner).extractItem() is high (> 15) (gocyclo)
    • Line 669: warning: cyclomatic complexity 38 of function (*Runner).Search() is high (> 15) (gocyclo)
    • cardigann/indexer/filters.go
    • Line 27: warning: cyclomatic complexity 21 of function invokeFilter() is high (> 15) (gocyclo)
    • Line 196: warning: cyclomatic complexity 20 of function parseTimeAgo() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • cardigann/torrentpotato/server.go
    • Line 10: warning: exported type Result should have comment or be unexported (golint)
    • Line 23: warning: exported type Results should have comment or be unexported (golint)
    • Line 28: warning: exported function Error should have comment or be unexported (golint)
    • Line 39: warning: exported function Output should have comment or be unexported (golint)
    • cardigann/torznab/category.go
    • Line 5: warning: exported type Category should have comment or be unexported (golint)
    • Line 15: warning: exported const CustomCategoryOffset should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: don't use underscores in Go names; var CategoryOther_Misc should be CategoryOtherMisc (golint)
    • Line 23: warning: don't use underscores in Go names; var CategoryOther_Hashed should be CategoryOtherHashed (golint)
    • Line 25: warning: don't use underscores in Go names; var CategoryConsole_NDS should be CategoryConsoleNDS (golint)
    • Line 26: warning: don't use underscores in Go names; var CategoryConsole_PSP should be CategoryConsolePSP (golint)
    • Line 27: warning: don't use underscores in Go names; var CategoryConsole_Wii should be CategoryConsoleWii (golint)
    • Line 28: warning: don't use underscores in Go names; var CategoryConsole_XBOX should be CategoryConsoleXBOX (golint)
    • Line 29: warning: don't use underscores in Go names; var CategoryConsole_XBOX360 should be CategoryConsoleXBOX360 (golint)
    • Line 30: warning: don't use underscores in Go names; var CategoryConsole_WiiwareVC should be CategoryConsoleWiiwareVC (golint)
    • Line 31: warning: don't use underscores in Go names; var CategoryConsole_XBOX360DLC should be CategoryConsoleXBOX360DLC (golint)
    • Line 32: warning: don't use underscores in Go names; var CategoryConsole_PS3 should be CategoryConsolePS3 (golint)
    • Line 33: warning: don't use underscores in Go names; var CategoryConsole_Other should be CategoryConsoleOther (golint)
    • Line 34: warning: don't use underscores in Go names; var CategoryConsole_3DS should be CategoryConsole3DS (golint)
    • Line 35: warning: don't use underscores in Go names; var CategoryConsole_PSVita should be CategoryConsolePSVita (golint)
    • Line 36: warning: don't use underscores in Go names; var CategoryConsole_WiiU should be CategoryConsoleWiiU (golint)
    • Line 37: warning: don't use underscores in Go names; var CategoryConsole_XBOXOne should be CategoryConsoleXBOXOne (golint)
    • Line 38: warning: don't use underscores in Go names; var CategoryConsole_PS4 should be CategoryConsolePS4 (golint)
    • Line 40: warning: don't use underscores in Go names; var CategoryMovies_Foreign should be CategoryMoviesForeign (golint)
    • Line 41: warning: don't use underscores in Go names; var CategoryMovies_Other should be CategoryMoviesOther (golint)
    • Line 42: warning: don't use underscores in Go names; var CategoryMovies_SD should be CategoryMoviesSD (golint)
    • Line 43: warning: don't use underscores in Go names; var CategoryMovies_HD should be CategoryMoviesHD (golint)
    • Line 44: warning: don't use underscores in Go names; var CategoryMovies_3D should be CategoryMovies3D (golint)
    • Line 45: warning: don't use underscores in Go names; var CategoryMovies_BluRay should be CategoryMoviesBluRay (golint)
    • Line 46: warning: don't use underscores in Go names; var CategoryMovies_DVD should be CategoryMoviesDVD (golint)
    • Line 47: warning: don't use underscores in Go names; var CategoryMovies_WEBDL should be CategoryMoviesWEBDL (golint)
    • Line 49: warning: don't use underscores in Go names; var CategoryAudio_MP3 should be CategoryAudioMP3 (golint)
    • Line 50: warning: don't use underscores in Go names; var CategoryAudio_Video should be CategoryAudioVideo (golint)
    • Line 51: warning: don't use underscores in Go names; var CategoryAudio_Audiobook should be CategoryAudioAudiobook (golint)
    • Line 52: warning: don't use underscores in Go names; var CategoryAudio_Lossless should be CategoryAudioLossless (golint)
    • Line 53: warning: don't use underscores in Go names; var CategoryAudio_Other should be CategoryAudioOther (golint)
    • Line 54: warning: don't use underscores in Go names; var CategoryAudio_Foreign should be CategoryAudioForeign (golint)
    • Line 56: warning: don't use underscores in Go names; var CategoryPC_0day should be CategoryPC0day (golint)
    • Line 57: warning: don't use underscores in Go names; var CategoryPC_ISO should be CategoryPCISO (golint)
    • Line 58: warning: don't use underscores in Go names; var CategoryPC_Mac should be CategoryPCMac (golint)
    • Line 59: warning: don't use underscores in Go names; var CategoryPC_PhoneOther should be CategoryPCPhoneOther (golint)
    • Line 60: warning: don't use underscores in Go names; var CategoryPC_Games should be CategoryPCGames (golint)
    • Line 61: warning: don't use underscores in Go names; var CategoryPC_PhoneIOS should be CategoryPCPhoneIOS (golint)
    • Line 62: warning: don't use underscores in Go names; var CategoryPC_PhoneAndroid should be CategoryPCPhoneAndroid (golint)
    • Line 64: warning: don't use underscores in Go names; var CategoryTV_WEBDL should be CategoryTVWEBDL (golint)
    • Line 65: warning: don't use underscores in Go names; var CategoryTV_FOREIGN should be CategoryTVFOREIGN (golint)
    • Line 66: warning: don't use underscores in Go names; var CategoryTV_SD should be CategoryTVSD (golint)
    • Line 67: warning: don't use underscores in Go names; var CategoryTV_HD should be CategoryTVHD (golint)
    • Line 68: warning: don't use underscores in Go names; var CategoryTV_Other should be CategoryTVOther (golint)
    • Line 69: warning: don't use underscores in Go names; var CategoryTV_Sport should be CategoryTVSport (golint)
    • Line 70: warning: don't use underscores in Go names; var CategoryTV_Anime should be CategoryTVAnime (golint)
    • Line 71: warning: don't use underscores in Go names; var CategoryTV_Documentary should be CategoryTVDocumentary (golint)
    • Line 73: warning: don't use underscores in Go names; var CategoryXXX_DVD should be CategoryXXXDVD (golint)
    • Line 74: warning: don't use underscores in Go names; var CategoryXXX_WMV should be CategoryXXXWMV (golint)
    • Line 75: warning: don't use underscores in Go names; var CategoryXXX_XviD should be CategoryXXXXviD (golint)
    • Line 76: warning: don't use underscores in Go names; var CategoryXXX_x264 should be CategoryXXXX264 (golint)
    • Line 77: warning: don't use underscores in Go names; var CategoryXXX_Other should be CategoryXXXOther (golint)
    • Line 78: warning: don't use underscores in Go names; var CategoryXXX_Imageset should be CategoryXXXImageset (golint)
    • Line 79: warning: don't use underscores in Go names; var CategoryXXX_Packs should be CategoryXXXPacks (golint)
    • Line 81: warning: don't use underscores in Go names; var CategoryBooks_Magazines should be CategoryBooksMagazines (golint)
    • Line 82: warning: don't use underscores in Go names; var CategoryBooks_Ebook should be CategoryBooksEbook (golint)
    • Line 83: warning: don't use underscores in Go names; var CategoryBooks_Comics should be CategoryBooksComics (golint)
    • Line 84: warning: don't use underscores in Go names; var CategoryBooks_Technical should be CategoryBooksTechnical (golint)
    • Line 85: warning: don't use underscores in Go names; var CategoryBooks_Foreign should be CategoryBooksForeign (golint)
    • Line 86: warning: don't use underscores in Go names; var CategoryBooks_Unknown should be CategoryBooksUnknown (golint)
    • Line 89: warning: exported var AllCategories should have comment or be unexported (golint)
    • Line 158: warning: exported function ParentCategory should have comment or be unexported (golint)
    • Line 180: warning: exported type Categories should have comment or be unexported (golint)
    • Line 182: warning: exported method Categories.Subset should have comment or be unexported (golint)
    • cardigann/indexer/load.go
    • Line 18: warning: exported var ErrUnknownIndexer should have comment or be unexported (golint)
    • Line 22: warning: exported function ListBuiltins should have comment or be unexported (golint)
    • Line 27: warning: exported function LoadEnabledDefinitions should have comment or be unexported (golint)
    • Line 45: warning: exported type DefinitionLoader should have comment or be unexported (golint)
    • cardigann/indexer/tester.go
    • Line 20: warning: exported type TesterOpts should have comment or be unexported (golint)
    • Line 24: warning: exported type Tester should have comment or be unexported (golint)
    • Line 131: warning: exported method Tester.Test should have comment or be unexported (golint)
    • cardigann/config/config.go
    • Line 8: warning: exported type Config should have comment or be unexported (golint)
    • Line 35: warning: exported const GlobalConfigSection should have comment (or a comment on this block) or be unexported (golint)
    • cardigann/torznab/caps.go
    • Line 10: warning: exported type Capabilities should have comment or be unexported (golint)
    • Line 15: warning: exported method Capabilities.HasSearchMode should have comment or be unexported (golint)
    • Line 24: warning: exported method Capabilities.HasTVShows should have comment or be unexported (golint)
    • Line 33: warning: exported method Capabilities.HasMovies should have comment or be unexported (golint)
    • Line 42: warning: exported type SearchMode should have comment or be unexported (golint)
    • Line 48: warning: exported method Capabilities.MarshalXML should have comment or be unexported (golint)
    • cardigann/indexer/runner.go
    • Line 45: warning: exported type RunnerOpts should have comment or be unexported (golint)
    • Line 51: warning: exported type Runner should have comment or be unexported (golint)
    • Line 61: warning: exported function NewRunner should have comment or be unexported (golint)
    • Line 563: warning: exported method Runner.Info should have comment or be unexported (golint)
    • Line 572: warning: exported method Runner.Capabilities should have comment or be unexported (golint)
    • Line 669: warning: exported method Runner.Search should have comment or be unexported (golint)
    • Line 1052: warning: exported method Runner.Download should have comment or be unexported (golint)
    • Line 1087: warning: exported method Runner.Ratio should have comment or be unexported (golint)
    • cardigann/logger/log.go
    • Line 11: warning: exported var Logger should have comment or be unexported (golint)
    • Line 25: warning: exported function SetFormatter should have comment or be unexported (golint)
    • Line 29: warning: exported function SetOutput should have comment or be unexported (golint)
    • Line 33: warning: exported function SetLevel should have comment or be unexported (golint)
    • Line 37: warning: exported function AddHook should have comment or be unexported (golint)
    • cardigann/config/dirs.go
    • Line 18: warning: exported function GetConfigPath should have comment or be unexported (golint)
    • Line 35: warning: exported function GetDefinitionDirs should have comment or be unexported (golint)
    • Line 51: warning: exported function GetCachePath should have comment or be unexported (golint)
    • cardigann/torznab/errors.go
    • Line 18: warning: exported var ErrIncorrectUserCreds should have comment or be unexported (golint)
    • Line 36: warning: exported function Error should have comment or be unexported (golint)
    • cardigann/server/handler.go
    • Line 1: warning: package comment should be of the form "Package server ..." (golint)
    • Line 32: warning: exported type Params should have comment or be unexported (golint)
    • Line 48: warning: exported function NewHandler should have comment or be unexported (golint)
    • cardigann/indexer/parser.go
    • Line 19: warning: exported type IndexerDefinition should have comment or be unexported (golint)
    • Line 33: warning: exported type IndexerDefinitionStats should have comment or be unexported (golint)
    • Line 40: warning: exported method IndexerDefinition.Stats should have comment or be unexported (golint)
    • Line 50: warning: exported function ParseDefinitionFile should have comment or be unexported (golint)
    • Line 70: warning: exported function ParseDefinition should have comment or be unexported (golint)
    • cardigann/config/arrayconfig.go
    • Line 3: warning: exported type ArrayConfig should have comment or be unexported (golint)
    • Line 5: warning: exported method ArrayConfig.Get should have comment or be unexported (golint)
    • Line 10: warning: exported method ArrayConfig.Set should have comment or be unexported (golint)
    • Line 18: warning: exported method ArrayConfig.Sections should have comment or be unexported (golint)
    • Line 26: warning: exported method ArrayConfig.Section should have comment or be unexported (golint)
    • cardigann/torznab/result.go
    • Line 12: warning: exported type ResultItem should have comment or be unexported (golint)
    • Line 33: warning: exported method ResultItem.MarshalXML should have comment or be unexported (golint)
    • Line 94: warning: exported type ResultFeed should have comment or be unexported (golint)
    • Line 99: warning: exported method ResultFeed.MarshalXML should have comment or be unexported (golint)
    • cardigann/server/server.go
    • Line 22: warning: exported function New should have comment or be unexported (golint)
    • Line 62: warning: exported method Server.Listen should have comment or be unexported (golint)
    • cardigann/indexer/aggregate.go
    • Line 13: warning: exported type Aggregate should have comment or be unexported (golint)
    • Line 15: warning: exported method Aggregate.Search should have comment or be unexported (golint)
    • Line 60: warning: exported method Aggregate.Info should have comment or be unexported (golint)
    • Line 69: warning: exported method Aggregate.Capabilities should have comment or be unexported (golint)
    • Line 79: warning: exported method Aggregate.Download should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words