Preparing report...

Report for github.com/indes/flowerss-bot

(v0.8.4)

A    Great!    Found 15 issues across 33 files

Tweet

gofmt75%

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!


gocyclo93%

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.

    • internal/bot/controller.go
    • Line 1155: warning: cyclomatic complexity 20 of function docCtr() is high (> 15) (gocyclo)
    • Line 1018: warning: cyclomatic complexity 19 of function textCtr() is high (> 15) (gocyclo)
    • Line 549: warning: cyclomatic complexity 18 of function unsubCmdCtr() is high (> 15) (gocyclo)

golint72%

Golint is a linter for Go source code.

    • internal/task/task.go
    • Line 9: warning: exported type Task should have comment or be unexported (golint)
    • Line 19: warning: exported function StartTasks should have comment or be unexported (golint)
    • Line 26: warning: exported function StopTasks should have comment or be unexported (golint)
    • internal/tgraph/publish.go
    • Line 12: warning: exported function PublishHtml should have comment or be unexported (golint)
    • Line 34: 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)
    • internal/config/config.go
    • Line 12: warning: exported type RunType should have comment or be unexported (golint)
    • Line 19: warning: exported var ProjectName should have comment or be unexported (golint)
    • Line 95: warning: exported const TestMode should have comment (or a comment on this block) or be unexported (golint)
    • Line 108: warning: exported type TplData should have comment or be unexported (golint)
    • Line 118: warning: exported function AppVersionInfo should have comment or be unexported (golint)
    • internal/model/source.go
    • Line 20: warning: exported type Source should have comment or be unexported (golint)
    • Line 40: warning: exported function GetSourceByUrl should have comment or be unexported (golint)
    • Line 82: warning: exported function FindOrNewSourceByUrl should have comment or be unexported (golint)
    • Line 112: warning: exported function GetSources should have comment or be unexported (golint)
    • Line 117: warning: exported function GetSubscribedNormalSources should have comment or be unexported (golint)
    • Line 131: warning: exported method Source.IsSubscribed should have comment or be unexported (golint)
    • Line 137: warning: exported method Source.NeedUpdate should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 178: warning: exported function GetSourcesByUserID should have comment or be unexported (golint)
    • Line 201: warning: exported function GetErrorSourcesByUserID should have comment or be unexported (golint)
    • Line 224: warning: exported function ActiveSourcesByUserID should have comment or be unexported (golint)
    • Line 243: warning: exported function PauseSourcesByUserID should have comment or be unexported (golint)
    • Line 262: warning: exported method Source.AddErrorCount should have comment or be unexported (golint)
    • Line 267: warning: exported method Source.EraseErrorCount should have comment or be unexported (golint)
    • Line 272: warning: exported method Source.Save should have comment or be unexported (golint)
    • Line 276: warning: exported function GetSourceById should have comment or be unexported (golint)
    • Line 286: warning: exported method Source.GetSubscribeNum should have comment or be unexported (golint)
    • Line 292: warning: exported method Source.DeleteContents should have comment or be unexported (golint)
    • Line 296: warning: exported method Source.DeleteDueNoSubscriber should have comment or be unexported (golint)
    • internal/model/subscribe.go
    • Line 11: warning: exported const MaxSubscribeTagLength should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type Subscribe should have comment or be unexported (golint)
    • Line 26: warning: exported function RegistFeed should have comment or be unexported (golint)
    • Line 46: warning: exported function GetSubscribeByUserIDAndSourceID should have comment or be unexported (golint)
    • Line 55: warning: exported function GetSubscribeByUserIDAndURL should have comment or be unexported (golint)
    • Line 68: warning: exported function GetSubscriberBySource should have comment or be unexported (golint)
    • Line 79: warning: exported function UnsubByUserIDAndSource should have comment or be unexported (golint)
    • Line 96: warning: exported function UnsubByUserIDAndSubID should have comment or be unexported (golint)
    • Line 112: warning: exported function UnsubAllByUserID should have comment or be unexported (golint)
    • Line 132: warning: exported function GetSubByUserIDAndURL should have comment or be unexported (golint)
    • Line 142: warning: exported function GetSubsByUserID should have comment or be unexported (golint)
    • Line 150: warning: exported function UnsubByUserIDAndSourceURL should have comment or be unexported (golint)
    • Line 159: warning: exported function GetSubscribeByID should have comment or be unexported (golint)
    • Line 165: warning: exported method Subscribe.ToggleNotification should have comment or be unexported (golint)
    • Line 174: warning: exported method Subscribe.ToggleTelegraph should have comment or be unexported (golint)
    • Line 183: warning: exported method Source.ToggleEnabled should have comment or be unexported (golint)
    • Line 196: warning: exported method Subscribe.SetTag should have comment or be unexported (golint)
    • Line 205: warning: exported method Subscribe.SetInterval should have comment or be unexported (golint)
    • Line 211: warning: exported method Subscribe.Unsub should have comment or be unexported (golint)
    • Line 219: warning: exported method Subscribe.Save should have comment or be unexported (golint)
    • internal/bot/fsm/state.go
    • Line 3: warning: exported type UserStatus should have comment or be unexported (golint)
    • Line 6: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • internal/task/rss.go
    • Line 51: warning: comment on exported method RssUpdateTask.Deregister should be of the form "Deregister ..." (golint)
    • internal/config/autoload.go
    • Line 151: warning: exported method TplData.Render should have comment or be unexported (golint)
    • Line 249: warning: exported method MysqlConfig.GetMysqlConnectingString should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.

    • internal/bot/service.go
    • Line 17: warning: ineffectual assignment to err (ineffassign)
    • Line 18: warning: ineffectual assignment to err (ineffassign)
    • Line 19: warning: ineffectual assignment to err (ineffassign)
    • Line 33: warning: ineffectual assignment to msg (ineffassign)
    • Line 38: warning: ineffectual assignment to msg (ineffassign)
    • Line 45: warning: ineffectual assignment to msg (ineffassign)
    • Line 60: warning: ineffectual assignment to err (ineffassign)
    • Line 71: warning: ineffectual assignment to err (ineffassign)
    • Line 76: warning: ineffectual assignment to msg (ineffassign)
    • Line 17: warning: ineffectual assignment to err (ineffassign)
    • Line 18: warning: ineffectual assignment to err (ineffassign)
    • Line 19: warning: ineffectual assignment to err (ineffassign)
    • Line 33: warning: ineffectual assignment to msg (ineffassign)
    • Line 38: warning: ineffectual assignment to msg (ineffassign)
    • Line 45: warning: ineffectual assignment to msg (ineffassign)
    • Line 60: warning: ineffectual assignment to err (ineffassign)
    • Line 71: warning: ineffectual assignment to err (ineffassign)
    • Line 76: warning: ineffectual assignment to msg (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!