Preparing report...

Report for github.com/dtm-labs/dtm

(v1.7.2)

A+    Excellent!    Found 19 issues across 106 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!


gocyclo99%

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.


golint84%

Golint is a linter for Go source code.

    • app/main.go
    • Line 24: warning: exported var Commit should have its own declaration (golint)
    • dtmsvr/storage/boltdb.go
    • Line 14: warning: exported type BoltdbStore should have comment or be unexported (golint)
    • Line 106: warning: exported method BoltdbStore.Ping should have comment or be unexported (golint)
    • Line 110: warning: exported method BoltdbStore.PopulateData should have comment or be unexported (golint)
    • Line 125: warning: exported method BoltdbStore.FindTransGlobalStore should have comment or be unexported (golint)
    • Line 134: warning: exported method BoltdbStore.ScanTransGlobalStores should have comment or be unexported (golint)
    • Line 160: warning: exported method BoltdbStore.FindBranches should have comment or be unexported (golint)
    • Line 170: warning: exported method BoltdbStore.UpdateBranchesSql should have comment or be unexported (golint)
    • Line 174: warning: exported method BoltdbStore.LockGlobalSaveBranches should have comment or be unexported (golint)
    • Line 189: warning: exported method BoltdbStore.MaySaveNewTrans should have comment or be unexported (golint)
    • Line 202: warning: exported method BoltdbStore.ChangeGlobalStatus should have comment or be unexported (golint)
    • Line 219: warning: exported method BoltdbStore.TouchCronTime should have comment or be unexported (golint)
    • Line 237: warning: exported method BoltdbStore.LockOneGlobalTrans should have comment or be unexported (golint)
    • dtmsvr/storage/redis.go
    • Line 16: warning: exported type RedisStore should have comment or be unexported (golint)
    • Line 19: warning: exported method RedisStore.Ping should have comment or be unexported (golint)
    • Line 24: warning: exported method RedisStore.PopulateData should have comment or be unexported (golint)
    • Line 29: warning: exported method RedisStore.FindTransGlobalStore should have comment or be unexported (golint)
    • Line 40: warning: exported method RedisStore.ScanTransGlobalStores should have comment or be unexported (golint)
    • Line 65: warning: exported method RedisStore.FindBranches should have comment or be unexported (golint)
    • Line 75: warning: exported method RedisStore.UpdateBranchesSql should have comment or be unexported (golint)
    • Line 131: warning: exported method RedisStore.MaySaveNewTrans should have comment or be unexported (golint)
    • Line 156: warning: exported method RedisStore.LockGlobalSaveBranches should have comment or be unexported (golint)
    • Line 185: warning: exported method RedisStore.ChangeGlobalStatus should have comment or be unexported (golint)
    • Line 208: warning: exported method RedisStore.LockOneGlobalTrans should have comment or be unexported (golint)
    • Line 238: warning: exported method RedisStore.TouchCronTime should have comment or be unexported (golint)
    • dtmsvr/storage/sql.go
    • Line 15: warning: exported type SqlStore should have comment or be unexported (golint)
    • Line 18: warning: exported method SqlStore.Ping should have comment or be unexported (golint)
    • Line 25: warning: exported method SqlStore.PopulateData should have comment or be unexported (golint)
    • Line 30: warning: exported method SqlStore.FindTransGlobalStore should have comment or be unexported (golint)
    • Line 40: warning: exported method SqlStore.ScanTransGlobalStores should have comment or be unexported (golint)
    • Line 55: warning: exported method SqlStore.FindBranches should have comment or be unexported (golint)
    • Line 61: warning: exported method SqlStore.UpdateBranchesSql should have comment or be unexported (golint)
    • Line 68: warning: exported method SqlStore.LockGlobalSaveBranches should have comment or be unexported (golint)
    • Line 80: warning: exported method SqlStore.MaySaveNewTrans should have comment or be unexported (golint)
    • Line 98: warning: exported method SqlStore.ChangeGlobalStatus should have comment or be unexported (golint)
    • Line 107: warning: exported method SqlStore.TouchCronTime should have comment or be unexported (golint)
    • Line 115: warning: exported method SqlStore.LockOneGlobalTrans should have comment or be unexported (golint)
    • dtmsvr/svr_imports.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • dtmsvr/storage/store.go
    • Line 12: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 13: warning: exported var ErrShouldRetry should have comment or be unexported (golint)
    • Line 14: warning: exported var ErrUniqueConflict should have comment or be unexported (golint)
    • Line 16: warning: exported type Store should have comment or be unexported (golint)
    • Line 37: warning: exported function GetStore should have comment or be unexported (golint)
    • examples/base.go
    • Line 5: warning: exported function Startup should have comment or be unexported (golint)
    • Line 11: warning: exported function InitConfig should have comment or be unexported (golint)
    • common/config.go
    • Line 15: warning: exported const DtmMetricsPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type Store should have comment or be unexported (golint)
    • Line 41: warning: exported method Store.IsDB should have comment or be unexported (golint)
    • Line 45: warning: exported method Store.GetDBConf should have comment or be unexported (golint)
    • Line 70: warning: exported function MustLoadConfig should have comment or be unexported (golint)
    • common/utils.go
    • Line 91: warning: exported function RecoverPanic should have comment or be unexported (golint)
    • Line 100: warning: exported function GetNextTime should have comment or be unexported (golint)

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!


misspell99%

Misspell Finds commonly misspelled English words