Preparing report...

Report for github.com/ovh/tat

A+    Excellent!    Found 25 issues across 172 files

Tweet

gofmt99%

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.

    • tat/message.go
    • Line 849: warning: cyclomatic complexity 50 of function GetMessageCriteriaFromURLValues() is high (> 15) (gocyclo)
    • Line 153: warning: cyclomatic complexity 48 of function (*MessageCriteria).CacheKey() is high (> 15) (gocyclo)
    • Line 708: warning: cyclomatic complexity 45 of function (*MessageCriteria).GetURL() is high (> 15) (gocyclo)
    • Line 1089: warning: cyclomatic complexity 27 of function (*Message).Format() is high (> 15) (gocyclo)
    • tat/topic.go
    • Line 107: warning: cyclomatic complexity 16 of function (*TopicCriteria).CacheKey() is high (> 15) (gocyclo)
    • tat/api/topics.go
    • Line 793: warning: cyclomatic complexity 21 of function (*TopicsController).SetParam() is high (> 15) (gocyclo)
    • tat/tatcli/ui/messages.go
    • Line 210: warning: cyclomatic complexity 29 of function (*tatui).prepareFilterMessages() is high (> 15) (gocyclo)
    • Line 424: warning: cyclomatic complexity 22 of function (*tatui).runActionOnMessage() is high (> 15) (gocyclo)
    • Line 154: warning: cyclomatic complexity 18 of function (*tatui).formatMessage() is high (> 15) (gocyclo)
    • Line 510: warning: cyclomatic complexity 18 of function (*tatui).RunExec() is high (> 15) (gocyclo)
    • tat/api/messages.go
    • Line 180: warning: cyclomatic complexity 48 of function (*MessagesController).preCheckTopic() is high (> 15) (gocyclo)
    • Line 579: warning: cyclomatic complexity 18 of function (*MessagesController).addOrRemoveLabel() is high (> 15) (gocyclo)
    • Line 371: warning: cyclomatic complexity 18 of function (*MessagesController).Update() is high (> 15) (gocyclo)
    • Line 511: warning: cyclomatic complexity 17 of function (*MessagesController).checkBeforeDelete() is high (> 15) (gocyclo)
    • Line 121: warning: cyclomatic complexity 16 of function (*MessagesController).innerList() is high (> 15) (gocyclo)
    • tat/api/message/message.go
    • Line 42: warning: cyclomatic complexity 85 of function buildMessageCriteria() is high (> 15) (gocyclo)
    • Line 763: warning: cyclomatic complexity 30 of function Insert() is high (> 15) (gocyclo)
    • Line 488: warning: cyclomatic complexity 18 of function ListMessages() is high (> 15) (gocyclo)
    • tat/api/check.go
    • Line 67: warning: cyclomatic complexity 16 of function extractTatHeaders() is high (> 15) (gocyclo)

golint96%

Golint is a linter for Go source code.

    • tat/api/cache/local.go
    • Line 12: warning: exported method LocalCache.Append should have comment or be unexported (golint)
    • Line 15: warning: exported method LocalCache.BLPop should have comment or be unexported (golint)
    • Line 18: warning: exported method LocalCache.BRPop should have comment or be unexported (golint)
    • Line 21: warning: exported method LocalCache.BRPopLPush should have comment or be unexported (golint)
    • Line 24: warning: exported method LocalCache.Decr should have comment or be unexported (golint)
    • Line 27: warning: exported method LocalCache.DecrBy should have comment or be unexported (golint)
    • Line 30: warning: exported method LocalCache.Del should have comment or be unexported (golint)
    • Line 33: warning: exported method LocalCache.Exists should have comment or be unexported (golint)
    • Line 36: warning: exported method LocalCache.Expire should have comment or be unexported (golint)
    • Line 39: warning: exported method LocalCache.ExpireAt should have comment or be unexported (golint)
    • Line 42: warning: exported method LocalCache.FlushDb should have comment or be unexported (golint)
    • Line 45: warning: exported method LocalCache.Get should have comment or be unexported (golint)
    • Line 48: warning: exported method LocalCache.GetBit should have comment or be unexported (golint)
    • Line 51: warning: exported method LocalCache.GetRange should have comment or be unexported (golint)
    • Line 54: warning: exported method LocalCache.GetSet should have comment or be unexported (golint)
    • Line 57: warning: exported method LocalCache.HDel should have comment or be unexported (golint)
    • Line 60: warning: exported method LocalCache.HExists should have comment or be unexported (golint)
    • Line 63: warning: exported method LocalCache.HGet should have comment or be unexported (golint)
    • Line 66: warning: exported method LocalCache.HGetAll should have comment or be unexported (golint)
    • Line 69: warning: exported method LocalCache.HIncrBy should have comment or be unexported (golint)
    • Line 72: warning: exported method LocalCache.HKeys should have comment or be unexported (golint)
    • Line 75: warning: exported method LocalCache.HLen should have comment or be unexported (golint)
    • Line 78: warning: exported method LocalCache.HMGet should have comment or be unexported (golint)
    • Line 81: warning: exported method LocalCache.HMSet should have comment or be unexported (golint)
    • Line 84: warning: exported method LocalCache.HScan should have comment or be unexported (golint)
    • Line 87: warning: exported method LocalCache.HSet should have comment or be unexported (golint)
    • Line 90: warning: exported method LocalCache.HSetNX should have comment or be unexported (golint)
    • Line 93: warning: exported method LocalCache.HVals should have comment or be unexported (golint)
    • Line 96: warning: exported method LocalCache.Incr should have comment or be unexported (golint)
    • Line 99: warning: exported method LocalCache.IncrBy should have comment or be unexported (golint)
    • Line 102: warning: exported method LocalCache.Info should have comment or be unexported (golint)
    • Line 105: warning: exported method LocalCache.LIndex should have comment or be unexported (golint)
    • Line 108: warning: exported method LocalCache.LInsert should have comment or be unexported (golint)
    • Line 111: warning: exported method LocalCache.LInsertAfter should have comment or be unexported (golint)
    • Line 114: warning: exported method LocalCache.LInsertBefore should have comment or be unexported (golint)
    • Line 117: warning: exported method LocalCache.LLen should have comment or be unexported (golint)
    • Line 120: warning: exported method LocalCache.LPop should have comment or be unexported (golint)
    • Line 123: warning: exported method LocalCache.LPush should have comment or be unexported (golint)
    • Line 126: warning: exported method LocalCache.LPushX should have comment or be unexported (golint)
    • Line 129: warning: exported method LocalCache.LRange should have comment or be unexported (golint)
    • Line 132: warning: exported method LocalCache.LRem should have comment or be unexported (golint)
    • Line 135: warning: exported method LocalCache.LSet should have comment or be unexported (golint)
    • Line 138: warning: exported method LocalCache.LTrim should have comment or be unexported (golint)
    • Line 141: warning: exported method LocalCache.MGet should have comment or be unexported (golint)
    • Line 144: warning: exported method LocalCache.MSet should have comment or be unexported (golint)
    • Line 147: warning: exported method LocalCache.MSetNX should have comment or be unexported (golint)
    • Line 150: warning: exported method LocalCache.PExpire should have comment or be unexported (golint)
    • Line 153: warning: exported method LocalCache.PExpireAt should have comment or be unexported (golint)
    • Line 156: warning: exported method LocalCache.Ping should have comment or be unexported (golint)
    • Line 159: warning: exported method LocalCache.PTTL should have comment or be unexported (golint)
    • Line 162: warning: exported method LocalCache.Persist should have comment or be unexported (golint)
    • Line 165: warning: exported method LocalCache.Pipeline should have comment or be unexported (golint)
    • Line 168: warning: exported method LocalCache.PubSubChannels should have comment or be unexported (golint)
    • Line 171: warning: exported method LocalCache.PubSubNumPat should have comment or be unexported (golint)
    • Line 174: warning: exported method LocalCache.Publish should have comment or be unexported (golint)
    • Line 177: warning: exported method LocalCache.RPop should have comment or be unexported (golint)
    • Line 180: warning: exported method LocalCache.RPopLPush should have comment or be unexported (golint)
    • Line 183: warning: exported method LocalCache.RPush should have comment or be unexported (golint)
    • Line 186: warning: exported method LocalCache.RPushX should have comment or be unexported (golint)
    • Line 189: warning: exported method LocalCache.Rename should have comment or be unexported (golint)
    • Line 192: warning: exported method LocalCache.RenameNX should have comment or be unexported (golint)
    • Line 195: warning: exported method LocalCache.SAdd should have comment or be unexported (golint)
    • Line 198: warning: exported method LocalCache.SCard should have comment or be unexported (golint)
    • Line 201: warning: exported method LocalCache.SDiff should have comment or be unexported (golint)
    • Line 204: warning: exported method LocalCache.SDiffStore should have comment or be unexported (golint)
    • Line 207: warning: exported method LocalCache.SInter should have comment or be unexported (golint)
    • Line 210: warning: exported method LocalCache.SInterStore should have comment or be unexported (golint)
    • Line 213: warning: exported method LocalCache.SIsMember should have comment or be unexported (golint)
    • Line 216: warning: exported method LocalCache.SMembers should have comment or be unexported (golint)
    • Line 219: warning: exported method LocalCache.SMove should have comment or be unexported (golint)
    • Line 222: warning: exported method LocalCache.SPop should have comment or be unexported (golint)
    • Line 225: warning: exported method LocalCache.SPopN should have comment or be unexported (golint)
    • Line 228: warning: exported method LocalCache.SRandMember should have comment or be unexported (golint)
    • Line 231: warning: exported method LocalCache.SRandMemberN should have comment or be unexported (golint)
    • Line 234: warning: exported method LocalCache.SRem should have comment or be unexported (golint)
    • Line 237: warning: exported method LocalCache.SScan should have comment or be unexported (golint)
    • Line 240: warning: exported method LocalCache.SUnion should have comment or be unexported (golint)
    • Line 243: warning: exported method LocalCache.SUnionStore should have comment or be unexported (golint)
    • Line 246: warning: exported method LocalCache.Scan should have comment or be unexported (golint)
    • Line 249: warning: exported method LocalCache.Set should have comment or be unexported (golint)
    • Line 252: warning: exported method LocalCache.SetBit should have comment or be unexported (golint)
    • Line 255: warning: exported method LocalCache.SetNX should have comment or be unexported (golint)
    • Line 258: warning: exported method LocalCache.SetRange should have comment or be unexported (golint)
    • Line 261: warning: exported method LocalCache.SetXX should have comment or be unexported (golint)
    • Line 264: warning: exported method LocalCache.Sort should have comment or be unexported (golint)
    • Line 267: warning: exported method LocalCache.StrLen should have comment or be unexported (golint)
    • Line 270: warning: exported method LocalCache.TTL should have comment or be unexported (golint)
    • Line 273: warning: exported method LocalCache.Type should have comment or be unexported (golint)
    • Line 276: warning: exported method LocalCache.ZAdd should have comment or be unexported (golint)
    • Line 279: warning: exported method LocalCache.ZAddCh should have comment or be unexported (golint)
    • Line 282: warning: exported method LocalCache.ZAddNX should have comment or be unexported (golint)
    • Line 285: warning: exported method LocalCache.ZAddNXCh should have comment or be unexported (golint)
    • Line 288: warning: exported method LocalCache.ZAddXX should have comment or be unexported (golint)
    • Line 291: warning: exported method LocalCache.ZAddXXCh should have comment or be unexported (golint)
    • Line 294: warning: exported method LocalCache.ZCard should have comment or be unexported (golint)
    • Line 297: warning: exported method LocalCache.ZCount should have comment or be unexported (golint)
    • Line 300: warning: exported method LocalCache.ZIncr should have comment or be unexported (golint)
    • Line 303: warning: exported method LocalCache.ZIncrBy should have comment or be unexported (golint)
    • Line 306: warning: exported method LocalCache.ZIncrNX should have comment or be unexported (golint)
    • Line 309: warning: exported method LocalCache.ZIncrXX should have comment or be unexported (golint)
    • Line 312: warning: exported method LocalCache.ZInterStore should have comment or be unexported (golint)
    • Line 316: warning: exported method LocalCache.ZRange should have comment or be unexported (golint)
    • Line 320: warning: exported method LocalCache.ZRangeByLex should have comment or be unexported (golint)
    • Line 324: warning: exported method LocalCache.ZRangeByScore should have comment or be unexported (golint)
    • Line 328: warning: exported method LocalCache.ZRangeByScoreWithScores should have comment or be unexported (golint)
    • Line 332: warning: exported method LocalCache.ZRangeWithScores should have comment or be unexported (golint)
    • Line 336: warning: exported method LocalCache.ZRank should have comment or be unexported (golint)
    • Line 340: warning: exported method LocalCache.ZRem should have comment or be unexported (golint)
    • Line 344: warning: exported method LocalCache.ZRemRangeByRank should have comment or be unexported (golint)
    • Line 348: warning: exported method LocalCache.ZRemRangeByScore should have comment or be unexported (golint)
    • Line 352: warning: exported method LocalCache.ZRevRange should have comment or be unexported (golint)
    • Line 356: warning: exported method LocalCache.ZRevRangeByLex should have comment or be unexported (golint)
    • Line 360: warning: exported method LocalCache.ZRevRangeByScore should have comment or be unexported (golint)
    • Line 364: warning: exported method LocalCache.ZRevRangeByScoreWithScores should have comment or be unexported (golint)
    • Line 368: warning: exported method LocalCache.ZRevRangeWithScores should have comment or be unexported (golint)
    • Line 372: warning: exported method LocalCache.ZRevRank should have comment or be unexported (golint)
    • Line 376: warning: exported method LocalCache.ZScan should have comment or be unexported (golint)
    • Line 379: warning: exported method LocalCache.ZScore should have comment or be unexported (golint)
    • Line 382: warning: exported method LocalCache.ZUnionStore should have comment or be unexported (golint)
    • tat/hook.go
    • Line 7: warning: exported var HookTat2XMPPHeaderKey should have comment or be unexported (golint)
    • Line 22: warning: exported var HooksType should have comment or be unexported (golint)
    • Line 25: warning: exported var HookTypeWebHook should have comment or be unexported (golint)
    • Line 32: warning: exported type Hook should have comment or be unexported (golint)
    • tat/message.go
    • Line 326: warning: exported type MessagesJSONIn should have comment or be unexported (golint)
    • Line 1061: warning: exported function GetDateRef should have comment or be unexported (golint)
    • tat/system.go
    • Line 3: warning: exported type Capabilities should have comment or be unexported (golint)
    • Line 8: warning: exported type CapabilitieHook should have comment or be unexported (golint)
    • tat/topic.go
    • Line 45: warning: exported type Filter should have comment or be unexported (golint)
    • Line 67: warning: exported method FilterCriteria.FilterCriteriaIsEmpty should have comment or be unexported (golint)
    • Line 594: warning: comment on exported method Client.TopicRemoveFilter should be of the form "TopicRemoveFilter ..." (golint)
    • Line 604: warning: comment on exported method Client.TopicUpdateFilter should be of the form "TopicUpdateFilter ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell93%

Misspell Finds commonly misspelled English words

    • tat/user.go
    • Line 78: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 167: warning: "Reponse" is a misspelling of "Response" (misspell)
    • tat/api/message/message.go
    • Line 527: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 539: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 622: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 632: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 738: warning: "criterias" is a misspelling of "criteria" (misspell)
    • tat/message.go
    • Line 961: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 979: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 1085: warning: "Avalable" is a misspelling of "Available" (misspell)
    • tat/api/messages.go
    • Line 889: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 895: warning: "criterias" is a misspelling of "criteria" (misspell)
    • Line 900: warning: "criterias" is a misspelling of "criteria" (misspell)