Preparing report...

Report for github.com/InVisionApp/go-master

A+    Excellent!    Found 8 issues across 17 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!


gocyclo100%

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.

No problems detected. Good job!


golint52%

Golint is a linter for Go source code.

    • go-master/backend/mysql/masterlock.go
    • Line 17: warning: exported const MasterLockID should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type MySQLMasterInfo should have comment or be unexported (golint)
    • Line 38: warning: exported method MySQLBackend.Lock should have comment or be unexported (golint)
    • Line 141: warning: exported method MySQLBackend.UnLock should have comment or be unexported (golint)
    • Line 153: warning: exported method MySQLBackend.WriteHeartbeat should have comment or be unexported (golint)
    • Line 180: warning: exported method MySQLBackend.Status should have comment or be unexported (golint)
    • go-master/backend/mysql/mysql.go
    • Line 1: warning: package comment should be of the form "Package mysql ..." (golint)
    • Line 11: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported const DefaultDBName should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type MySQLBackend should have comment or be unexported (golint)
    • Line 31: warning: exported type MySQLBackendConfig should have comment or be unexported (golint)
    • Line 72: warning: exported function NewMySQLBackend should have comment or be unexported (golint)
    • Line 118: warning: exported method MySQLBackend.Connect should have comment or be unexported (golint)
    • go-master/master.go
    • Line 17: warning: exported const DefaultHeartbeatFrequency should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type Master should have comment or be unexported (golint)
    • Line 53: warning: exported type MasterConfig should have comment or be unexported (golint)
    • Line 80: warning: exported function New should have comment or be unexported (golint)
    • go-master/backend/mongo/masterlock.go
    • Line 17: warning: exported const MasterInfoID should have comment or be unexported (golint)
    • Line 19: warning: exported type MongoMasterInfo should have comment or be unexported (golint)
    • Line 36: warning: comment on exported method MongoBackend.Lock should be of the form "Lock ..." (golint)
    • Line 98: warning: comment on exported method MongoBackend.UnLock should be of the form "UnLock ..." (golint)
    • Line 114: warning: comment on exported method MongoBackend.WriteHeartbeat should be of the form "WriteHeartbeat ..." (golint)
    • Line 136: warning: comment on exported method MongoBackend.Status should be of the form "Status ..." (golint)
    • go-master/backend/mongo/mongodb.go
    • Line 20: warning: exported const DefaultCollectionName should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type MongoBackend should have comment or be unexported (golint)
    • Line 38: warning: exported type MongoBackendConfig should have comment or be unexported (golint)
    • Line 52: warning: exported type MongoConnectConfig should have comment or be unexported (golint)
    • Line 65: warning: exported function New should have comment or be unexported (golint)
    • Line 100: warning: exported method MongoBackend.Connect should have comment or be unexported (golint)
    • Line 147: warning: exported type SmartCollection should have comment or be unexported (golint)
    • Line 165: warning: exported method SmartCollection.Collection should have comment or be unexported (golint)
    • Line 182: warning: exported method SmartCollection.EnsureIndexes should have comment or be unexported (golint)
    • Line 193: warning: comment on exported method SmartCollection.UpsertIndex should be of the form "UpsertIndex ..." (golint)
    • Line 218: warning: exported method SmartCollection.StartMongoDatastoreSegment should have comment or be unexported (golint)
    • Line 231: warning: exported type RWLocker should have comment or be unexported (golint)
    • go-master/safe/safe.go
    • Line 13: warning: exported type SafeBool should have comment or be unexported (golint)
    • Line 18: warning: comment on exported function NewBool should be of the form "NewBool ..." (golint)
    • Line 23: warning: exported method SafeBool.SetFalse should have comment or be unexported (golint)
    • Line 29: warning: exported method SafeBool.SetTrue should have comment or be unexported (golint)
    • Line 35: warning: exported method SafeBool.Val should have comment or be unexported (golint)
    • go-master/backend/backend.go
    • Line 7: warning: exported type MasterLock should have comment or be unexported (golint)
    • Line 25: warning: exported type MasterInfo should have comment or be unexported (golint)
    • go-master/example/example.go
    • Line 51: warning: exported function MongDBBackend should have comment or be unexported (golint)
    • Line 72: warning: exported function MySQLBackend should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!