Preparing report...

Report for github.com/kirinrastogi/proxysql-go

A+    Excellent!    Found 6 issues across 12 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!


golint50%

Golint is a linter for Go source code.

    • proxysql-go/host.go
    • Line 11: warning: don't use underscores in Go names; struct field hostgroup_id should be hostgroupID (golint)
    • Line 17: warning: don't use underscores in Go names; struct field max_connections should be maxConnections (golint)
    • Line 18: warning: don't use underscores in Go names; struct field max_replication_lag should be maxReplicationLag (golint)
    • Line 19: warning: don't use underscores in Go names; struct field use_ssl should be useSsl (golint)
    • Line 20: warning: don't use underscores in Go names; struct field max_latency_ms should be maxLatencyMs (golint)
    • Line 44: warning: exported method Host.SetHostname should have comment or be unexported (golint)
    • Line 49: warning: exported method Host.SetPort should have comment or be unexported (golint)
    • Line 54: warning: exported method Host.SetHostgroupID should have comment or be unexported (golint)
    • Line 59: warning: exported method Host.SetStatus should have comment or be unexported (golint)
    • Line 64: warning: exported method Host.SetWeight should have comment or be unexported (golint)
    • Line 69: warning: exported method Host.SetCompression should have comment or be unexported (golint)
    • Line 74: warning: exported method Host.SetMaxConnections should have comment or be unexported (golint)
    • Line 79: warning: exported method Host.SetMaxReplicationLag should have comment or be unexported (golint)
    • Line 84: warning: exported method Host.SetUseSSL should have comment or be unexported (golint)
    • Line 89: warning: exported method Host.SetMaxLatencyMS should have comment or be unexported (golint)
    • Line 94: warning: exported method Host.SetComment should have comment or be unexported (golint)
    • Line 101: warning: exported method Host.Hostname should have comment or be unexported (golint)
    • Line 105: warning: exported method Host.Port should have comment or be unexported (golint)
    • Line 109: warning: exported method Host.HostgroupID should have comment or be unexported (golint)
    • Line 113: warning: exported method Host.Status should have comment or be unexported (golint)
    • Line 117: warning: exported method Host.Weight should have comment or be unexported (golint)
    • Line 121: warning: exported method Host.Compression should have comment or be unexported (golint)
    • Line 125: warning: exported method Host.MaxConnections should have comment or be unexported (golint)
    • Line 129: warning: exported method Host.MaxReplicationLag should have comment or be unexported (golint)
    • Line 133: warning: exported method Host.UseSSL should have comment or be unexported (golint)
    • Line 137: warning: exported method Host.MaxLatencyMS should have comment or be unexported (golint)
    • Line 141: warning: exported method Host.Comment should have comment or be unexported (golint)
    • Line 145: warning: exported method Host.Valid should have comment or be unexported (golint)
    • proxysql-go/proxysql.go
    • Line 13: warning: exported type ProxySQL should have comment or be unexported (golint)
    • Line 164: warning: don't use underscores in Go names; var hostgroup_id should be hostgroupID (golint)
    • Line 170: warning: don't use underscores in Go names; var max_connections should be maxConnections (golint)
    • Line 171: warning: don't use underscores in Go names; var max_replication_lag should be maxReplicationLag (golint)
    • Line 172: warning: don't use underscores in Go names; var use_ssl should be useSsl (golint)
    • Line 173: warning: don't use underscores in Go names; var max_latency_ms should be maxLatencyMs (golint)
    • Line 213: warning: don't use underscores in Go names; var hostgroup_id should be hostgroupID (golint)
    • Line 219: warning: don't use underscores in Go names; var max_connections should be maxConnections (golint)
    • Line 220: warning: don't use underscores in Go names; var max_replication_lag should be maxReplicationLag (golint)
    • Line 221: warning: don't use underscores in Go names; var use_ssl should be useSsl (golint)
    • Line 222: warning: don't use underscores in Go names; var max_latency_ms should be maxLatencyMs (golint)
    • proxysql-go/proxysql_test.go
    • Line 499: warning: don't use underscores in Go names; var runtime_servers should be runtimeServers (golint)
    • Line 524: warning: don't use underscores in Go names; var max_connections should be maxConnections (golint)
    • Line 525: warning: don't use underscores in Go names; var hostgroup_id should be hostgroupID (golint)
    • Line 529: warning: don't use underscores in Go names; var max_replication_lag should be maxReplicationLag (golint)
    • Line 530: warning: don't use underscores in Go names; var use_ssl should be useSsl (golint)
    • Line 531: warning: don't use underscores in Go names; var max_latency_ms should be maxLatencyMs (golint)
    • proxysql-go/example/mock.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 9: warning: comment on exported type ProxySQLMock should be of the form "ProxySQLMock ..." (with optional leading article) (golint)
    • Line 15: warning: exported function NewProxySQLMock should have comment or be unexported (golint)
    • Line 19: warning: comment on exported method ProxySQLMock.Ping should be of the form "Ping ..." (golint)
    • Line 27: warning: comment on exported method ProxySQLMock.AddHost should be of the form "AddHost ..." (golint)
    • Line 35: warning: comment on exported method ProxySQLMock.AddHosts should be of the form "AddHosts ..." (golint)
    • Line 43: warning: comment on exported method ProxySQLMock.PersistChanges should be of the form "PersistChanges ..." (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!