Preparing report...

Report for github.com/adanalife/tripbot

A+    Excellent!    Found 46 issues across 61 files

Tweet

gofmt98%

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!


gocyclo98%

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.


golint26%

Golint is a linter for Go source code.

    • tripbot/pkg/onscreens-server/middle-text.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensServer should be onscreensserver (golint)
    • Line 12: warning: exported var MiddleText should have comment or be unexported (golint)
    • Line 14: warning: exported function InitMiddleText should have comment or be unexported (golint)
    • tripbot/pkg/server/twitch.go
    • Line 42: warning: comment on exported type SubscriptionWebhook should be of the form "SubscriptionWebhook ..." (with optional leading article) (golint)
    • Line 49: warning: exported type ManyEvents should have comment or be unexported (golint)
    • Line 53: warning: exported type Event should have comment or be unexported (golint)
    • tripbot/pkg/users/leaderboard.go
    • Line 15: warning: exported var LifetimeMilesLeaderboard should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function InitLeaderboard should be of the form "InitLeaderboard ..." (golint)
    • Line 44: warning: exported function UpdateLeaderboard should have comment or be unexported (golint)
    • tripbot/pkg/users/scores.go
    • Line 8: warning: exported method User.GetScore should have comment or be unexported (golint)
    • Line 17: warning: exported method User.AddToScore should have comment or be unexported (golint)
    • tripbot/pkg/scoreboards/miles.go
    • Line 5: warning: exported function CurrentMilesScoreboard should have comment or be unexported (golint)
    • Line 10: warning: exported function CurrentGuessScoreboard should have comment or be unexported (golint)
    • tripbot/pkg/onscreens-client/onscreens-client.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensClient should be onscreensclient (golint)
    • Line 19: warning: exported function HideMiddleText should have comment or be unexported (golint)
    • Line 28: warning: exported function ShowMiddleText should have comment or be unexported (golint)
    • Line 39: warning: exported function ShowLeaderboard should have comment or be unexported (golint)
    • Line 53: warning: comment on exported function ShowGuessLeaderboard should be of the form "ShowGuessLeaderboard ..." (golint)
    • Line 74: warning: exported function ShowTimewarp should have comment or be unexported (golint)
    • Line 83: warning: exported function ShowFlag should have comment or be unexported (golint)
    • Line 95: warning: exported function ShowGPSImage should have comment or be unexported (golint)
    • Line 106: warning: exported function HideGPSImage should have comment or be unexported (golint)
    • Line 121: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • tripbot/pkg/video/type.go
    • Line 15: warning: comment on exported type Video should be of the form "Video ..." (with optional leading article) (golint)
    • Line 46: warning: comment on exported method Video.DashStr should be of the form "DashStr ..." (golint)
    • Line 58: warning: comment on exported method Video.File should be of the form "File ..." (golint)
    • Line 63: warning: comment on exported method Video.Path should be of the form "Path ..." (golint)
    • tripbot/pkg/helpers/helpers.go
    • Line 28: warning: exported function CityFromCoords should have comment or be unexported (golint)
    • Line 44: warning: exported function StateFromCoords should have comment or be unexported (golint)
    • Line 131: warning: exported function RemoveNonLetters should have comment or be unexported (golint)
    • Line 157: warning: exported function ActualDate should have comment or be unexported (golint)
    • Line 166: warning: exported function SunsetStr should have comment or be unexported (golint)
    • Line 187: warning: comment on exported function OpenInBrowser should be of the form "OpenInBrowser ..." (golint)
    • Line 196: warning: comment on exported function RunningOnDarwin should be of the form "RunningOnDarwin ..." (golint)
    • Line 212: warning: comment on exported function WritePidFile should be of the form "WritePidFile ..." (golint)
    • Line 236: warning: exported function ReadPidFile should have comment or be unexported (golint)
    • Line 249: warning: comment on exported function PidExists should be of the form "PidExists ..." (golint)
    • Line 278: warning: comment on exported function Base64Encode should be of the form "Base64Encode ..." (golint)
    • Line 283: warning: exported function Base64Decode should have comment or be unexported (golint)
    • Line 291: warning: exported function StripAtSign should have comment or be unexported (golint)
    • tripbot/pkg/users/session.go
    • Line 49: warning: should omit 2nd value from range; this loop is equivalent to `for chatter := range ...` (golint)
    • Line 153: warning: comment on exported function Shutdown should be of the form "Shutdown ..." (golint)
    • Line 175: warning: should omit 2nd value from range; this loop is equivalent to `for username := range ...` (golint)
    • tripbot/pkg/config/vlc-server/helpers.go
    • Line 3: warning: exported method VlcServerConfig.IsProduction should have comment or be unexported (golint)
    • Line 7: warning: exported method VlcServerConfig.IsStaging should have comment or be unexported (golint)
    • Line 11: warning: exported method VlcServerConfig.IsDevelopment should have comment or be unexported (golint)
    • Line 15: warning: exported method VlcServerConfig.IsTesting should have comment or be unexported (golint)
    • tripbot/pkg/errors/errors.go
    • Line 22: warning: comment on exported function Log should be of the form "Log ..." (golint)
    • Line 37: warning: exported function Fatal should have comment or be unexported (golint)
    • tripbot/pkg/onscreens-server/flag.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensServer should be onscreensserver (golint)
    • Line 16: warning: exported var FlagImage should have comment or be unexported (golint)
    • Line 17: warning: exported var FlagImageFile should have comment or be unexported (golint)
    • Line 21: warning: exported function InitFlagImage should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function ShowFlag should be of the form "ShowFlag ..." (golint)
    • tripbot/pkg/onscreens-server/timewarp.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensServer should be onscreensserver (golint)
    • Line 11: warning: exported var Timewarp should have comment or be unexported (golint)
    • Line 16: warning: exported function InitTimewarp should have comment or be unexported (golint)
    • Line 21: warning: exported function ShowTimewarp should have comment or be unexported (golint)
    • tripbot/pkg/database/database.go
    • Line 1: warning: package comment should be of the form "Package database ..." (golint)
    • Line 14: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 55: warning: exported function Connection should have comment or be unexported (golint)
    • tripbot/pkg/chatbot/handlers.go
    • Line 206: warning: comment on exported function PrivateMessage should be of the form "PrivateMessage ..." (golint)
    • Line 227: warning: comment on exported function UserJoin should be of the form "UserJoin ..." (golint)
    • Line 232: warning: comment on exported function UserPart should be of the form "UserPart ..." (golint)
    • Line 243: warning: comment on exported function GetWhisper should be of the form "GetWhisper ..." (golint)
    • tripbot/pkg/errors/types.go
    • Line 5: warning: exported type NoFootageForStateError should have comment or be unexported (golint)
    • Line 13: warning: exported type ReadOnlyError should have comment or be unexported (golint)
    • tripbot/pkg/users/users.go
    • Line 17: warning: exported type User should have comment or be unexported (golint)
    • Line 62: warning: exported method User.CurrentMiles should have comment or be unexported (golint)
    • Line 66: warning: exported method User.BonusMiles should have comment or be unexported (golint)
    • Line 75: warning: exported method User.CurrentMonthlyMiles should have comment or be unexported (golint)
    • Line 183: warning: exported method User.SetLastLocationTime should have comment or be unexported (golint)
    • tripbot/pkg/video/db.go
    • Line 15: warning: comment on exported function LoadOrCreate should be of the form "LoadOrCreate ..." (golint)
    • Line 155: warning: comment on exported method Video.Next should be of the form "Next ..." (golint)
    • Line 170: warning: exported method Video.SetNextVid should have comment or be unexported (golint)
    • Line 197: warning: exported function FindRandomByState should have comment or be unexported (golint)
    • tripbot/pkg/twitch/authentication.go
    • Line 17: warning: comment on exported var ClientID should be of the form "ClientID ..." (golint)
    • Line 19: warning: exported var ClientSecret should have comment or be unexported (golint)
    • Line 20: warning: exported var AuthToken should have comment or be unexported (golint)
    • Line 21: warning: exported var AppAccessToken should have comment or be unexported (golint)
    • Line 23: warning: comment on exported var UserAccessToken should be of the form "UserAccessToken ..." (golint)
    • Line 25: warning: exported var UserRefreshToken should have comment or be unexported (golint)
    • tripbot/pkg/background/cron.go
    • Line 9: warning: exported var Cron should have comment or be unexported (golint)
    • Line 11: warning: exported function StartCron should have comment or be unexported (golint)
    • Line 17: warning: exported function StopCron should have comment or be unexported (golint)
    • tripbot/pkg/onscreens-server/leaderboard.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensServer should be onscreensserver (golint)
    • Line 14: warning: exported var Leaderboard should have comment or be unexported (golint)
    • Line 16: warning: exported function InitLeaderboard should have comment or be unexported (golint)
    • Line 21: warning: exported function ShowLeaderboard should have comment or be unexported (golint)
    • tripbot/pkg/onscreens-server/left-rotator.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensServer should be onscreensserver (golint)
    • Line 12: warning: exported var LeftRotator should have comment or be unexported (golint)
    • Line 36: warning: exported function InitLeftRotator should have comment or be unexported (golint)
    • tripbot/pkg/vlc-client/vlc-client.go
    • Line 1: warning: don't use MixedCaps in package name; vlcClient should be vlcclient (golint)
    • Line 46: warning: exported function Skip should have comment or be unexported (golint)
    • Line 59: warning: exported function Back should have comment or be unexported (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • tripbot/pkg/onscreens-server/right-rotator.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensServer should be onscreensserver (golint)
    • Line 12: warning: exported var RightRotator should have comment or be unexported (golint)
    • Line 27: warning: exported function InitRightRotator should have comment or be unexported (golint)
    • tripbot/pkg/helpers/states.go
    • Line 5: warning: exported function StateAbbrevToState should have comment or be unexported (golint)
    • Line 13: warning: exported function StateToStateAbbrev should have comment or be unexported (golint)
    • Line 23: warning: comment on exported function TitlecaseState should be of the form "TitlecaseState ..." (golint)
    • tripbot/pkg/events/events.go
    • Line 13: warning: exported type Event should have comment or be unexported (golint)
    • Line 20: warning: exported function Login should have comment or be unexported (golint)
    • Line 34: warning: exported function Logout should have comment or be unexported (golint)
    • tripbot/pkg/config/tripbot/helpers.go
    • Line 7: warning: exported method TripbotConfig.IsProduction should have comment or be unexported (golint)
    • Line 11: warning: exported method TripbotConfig.IsStaging should have comment or be unexported (golint)
    • Line 15: warning: exported method TripbotConfig.IsDevelopment should have comment or be unexported (golint)
    • Line 19: warning: exported method TripbotConfig.IsTesting should have comment or be unexported (golint)
    • Line 39: warning: comment on exported var IgnoredUsers should be of the form "IgnoredUsers ..." (golint)
    • Line 153: warning: exported var GoogleMapsStyle should have comment or be unexported (golint)
    • Line 174: warning: comment on exported var TimestampsToTry should be of the form "TimestampsToTry ..." (golint)
    • tripbot/pkg/onscreens-server/gps.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensServer should be onscreensserver (golint)
    • Line 11: warning: exported var GPSImage should have comment or be unexported (golint)
    • Line 16: warning: exported function InitGPSImage should have comment or be unexported (golint)
    • Line 21: warning: comment on exported function ShowGPSImage should be of the form "ShowGPSImage ..." (golint)
    • Line 27: warning: comment on exported function HideGPSImage should be of the form "HideGPSImage ..." (golint)
    • tripbot/pkg/onscreens-server/onscreens.go
    • Line 1: warning: don't use MixedCaps in package name; onscreensServer should be onscreensserver (golint)
    • Line 24: warning: exported type Onscreen should have comment or be unexported (golint)
    • Line 34: warning: exported function New should have comment or be unexported (golint)
    • Line 46: warning: exported function NewImage should have comment or be unexported (golint)
    • Line 72: warning: exported method Onscreen.Extend should have comment or be unexported (golint)
    • Line 111: warning: exported method Onscreen.SetContent should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.

    • tripbot/cmd/tripbot/tripbot.go
    • Line 164: warning: ineffectual assignment to err (ineffassign)
    • Line 165: warning: ineffectual assignment to err (ineffassign)
    • Line 166: warning: ineffectual assignment to err (ineffassign)
    • Line 167: warning: ineffectual assignment to err (ineffassign)
    • Line 168: warning: ineffectual assignment to err (ineffassign)
    • Line 169: warning: ineffectual assignment to err (ineffassign)
    • Line 170: warning: ineffectual assignment to err (ineffassign)
    • Line 171: warning: ineffectual assignment to err (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!