Preparing report...

Report for github.com/yi-jiayu/bus-eta-bot

A+    Excellent!    Found 15 issues across 35 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!


golint57%

Golint is a linter for Go source code.

    • bus-eta-bot/db.go
    • Line 14: warning: exported const EnvironmentDev should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported function GetBotEnvironment should have comment or be unexported (golint)
    • bus-eta-bot/users.go
    • Line 13: warning: exported const KindFavourites should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported type User should have comment or be unexported (golint)
    • Line 27: warning: exported type DatastoreUserRepository should have comment or be unexported (golint)
    • Line 30: warning: exported method DatastoreUserRepository.UpdateUserLastSeenTime should have comment or be unexported (golint)
    • Line 46: warning: exported method DatastoreUserRepository.GetUserFavourites should have comment or be unexported (golint)
    • Line 66: warning: exported method DatastoreUserRepository.SetUserFavourites should have comment or be unexported (golint)
    • bus-eta-bot/busstops.go
    • Line 25: warning: exported type NearbyBusStop should have comment or be unexported (golint)
    • Line 30: warning: exported type InMemoryBusStopRepository should have comment or be unexported (golint)
    • Line 36: warning: exported method InMemoryBusStopRepository.Get should have comment or be unexported (golint)
    • Line 98: warning: exported method InMemoryBusStopRepository.Search should have comment or be unexported (golint)
    • Line 163: warning: exported function NewInMemoryBusStopRepository should have comment or be unexported (golint)
    • Line 176: warning: exported function NewInMemoryBusStopRepositoryFromFile should have comment or be unexported (golint)
    • bus-eta-bot/format.go
    • Line 16: warning: exported const FormatterSummary should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported var Formatters should have comment or be unexported (golint)
    • Line 63: warning: exported type ArrivingBus should have comment or be unexported (golint)
    • Line 68: warning: exported type Formatter should have comment or be unexported (golint)
    • Line 72: warning: exported type TemplateFormatter should have comment or be unexported (golint)
    • Line 76: warning: exported method TemplateFormatter.Format should have comment or be unexported (golint)
    • bus-eta-bot/inlinequery.go
    • Line 17: warning: exported const InlineQueryResultsLimit should have comment or be unexported (golint)
    • Line 19: warning: exported type StreetViewProvider should have comment or be unexported (golint)
    • Line 23: warning: exported function GetNearbyInlineQueryResults should have comment or be unexported (golint)
    • bus-eta-bot/telegram/inline.go
    • Line 7: warning: exported type InputMessageContent should have comment or be unexported (golint)
    • Line 11: warning: exported type InputTextMessageContent should have comment or be unexported (golint)
    • Line 23: warning: exported type InlineQueryResult should have comment or be unexported (golint)
    • Line 27: warning: exported type InlineQueryResultArticle should have comment or be unexported (golint)
    • Line 52: warning: exported type AnswerInlineQueryRequest should have comment or be unexported (golint)
    • bus-eta-bot/bot.go
    • Line 21: warning: exported const MaxMessageLength should have comment or be unexported (golint)
    • Line 42: warning: exported type UserRepository should have comment or be unexported (golint)
    • Line 48: warning: exported type ETAService should have comment or be unexported (golint)
    • Line 52: warning: exported type TelegramService should have comment or be unexported (golint)
    • Line 82: warning: exported type Response should have comment or be unexported (golint)
    • bus-eta-bot/eta.go
    • Line 27: warning: exported type ETA should have comment or be unexported (golint)
    • Line 34: warning: exported type FormatterFactory should have comment or be unexported (golint)
    • Line 38: warning: exported type BusStopGetter should have comment or be unexported (golint)
    • Line 67: warning: exported type ETAFormatter should have comment or be unexported (golint)
    • Line 74: warning: exported type ETARequest should have comment or be unexported (golint)
    • Line 81: warning: exported type ETAMessageFactory should have comment or be unexported (golint)
    • Line 87: warning: exported method ETAMessageFactory.Text should have comment or be unexported (golint)
    • Line 104: warning: exported function NewETA should have comment or be unexported (golint)
    • Line 135: warning: exported method SummaryETAFormatter.Format should have comment or be unexported (golint)
    • Line 314: warning: exported function NewRefreshButton should have comment or be unexported (golint)
    • Line 328: warning: exported function NewIncomingBusDetailsButton should have comment or be unexported (golint)
    • Line 342: warning: exported function NewIncomingBusSummaryButton should have comment or be unexported (golint)
    • Line 356: warning: exported function NewResendButton should have comment or be unexported (golint)
    • Line 370: warning: exported function NewToggleFavouriteButton should have comment or be unexported (golint)
    • Line 386: warning: exported function NewETAMessageReplyMarkup should have comment or be unexported (golint)
    • bus-eta-bot/telegram/markup.go
    • Line 7: warning: exported type ReplyMarkup should have comment or be unexported (golint)
    • Line 11: warning: exported type InlineKeyboardButton should have comment or be unexported (golint)
    • Line 17: warning: exported type InlineKeyboardMarkup should have comment or be unexported (golint)
    • Line 46: warning: exported type ForceReply should have comment or be unexported (golint)
    • Line 69: warning: exported type KeyboardButton should have comment or be unexported (golint)
    • Line 73: warning: exported type ReplyKeyboardMarkup should have comment or be unexported (golint)
    • Line 96: warning: exported type ReplyKeyboardRemove should have comment or be unexported (golint)
    • bus-eta-bot/telegram/telegram.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 13: warning: exported type Error should have comment or be unexported (golint)
    • Line 28: warning: exported type SendMessageRequest should have comment or be unexported (golint)
    • Line 58: warning: exported type EditMessageTextRequest should have comment or be unexported (golint)
    • Line 96: warning: exported type AnswerCallbackQueryRequest should have comment or be unexported (golint)
    • Line 110: warning: exported type Client should have comment or be unexported (golint)
    • Line 123: warning: exported function NewClient should have comment or be unexported (golint)
    • bus-eta-bot/geo.go
    • Line 4: warning: exported const EquatorialLatitude should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: comment on exported function SquaredEuclideanDistanceAtEquator should be of the form "SquaredEuclideanDistanceAtEquator ..." (golint)

gocyclo97%

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.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!