Preparing report...

Report for github.com/hhxsv5/go-redis-memory-analysis

A    Great!    Found 7 issues across 9 files

Tweet

gofmt88%

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!


gocyclo88%

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.


golint22%

Golint is a linter for Go source code.

    • go-redis-memory-analysis/analysis_interface.go
    • Line 3: warning: exported type AnalysisInterface should have comment or be unexported (golint)
    • Line 9: warning: exported type Report should have comment or be unexported (golint)
    • Line 17: warning: exported type DBReports should have comment or be unexported (golint)
    • Line 18: warning: exported type KeyReports should have comment or be unexported (golint)
    • Line 19: warning: exported type SortBySizeReports should have comment or be unexported (golint)
    • Line 20: warning: exported type SortByCountReports should have comment or be unexported (golint)
    • go-redis-memory-analysis/analysis_rdb.go
    • Line 15: warning: exported type AnalysisRDB should have comment or be unexported (golint)
    • Line 20: warning: exported function NewAnalysisRDB should have comment or be unexported (golint)
    • Line 28: warning: exported method AnalysisRDB.Close should have comment or be unexported (golint)
    • Line 34: warning: exported method AnalysisRDB.Start should have comment or be unexported (golint)
    • Line 188: warning: exported method AnalysisRDB.SaveReports should have comment or be unexported (golint)
    • go-redis-memory-analysis/storages/file.go
    • Line 8: warning: exported type File should have comment or be unexported (golint)
    • Line 13: warning: exported function NewFile should have comment or be unexported (golint)
    • Line 21: warning: exported method File.ReadAll should have comment or be unexported (golint)
    • Line 25: warning: exported method File.WriteAll should have comment or be unexported (golint)
    • Line 29: warning: exported method File.Append should have comment or be unexported (golint)
    • Line 34: warning: exported method File.Truncate should have comment or be unexported (golint)
    • Line 42: warning: exported method File.Close should have comment or be unexported (golint)
    • go-redis-memory-analysis/storages/redis.go
    • Line 11: warning: exported type RedisClient should have comment or be unexported (golint)
    • Line 16: warning: exported function NewRedisClient should have comment or be unexported (golint)
    • Line 37: warning: exported method RedisClient.Select should have comment or be unexported (golint)
    • Line 42: warning: exported method RedisClient.GetDatabases should have comment or be unexported (golint)
    • Line 63: warning: exported method RedisClient.Scan should have comment or be unexported (golint)
    • Line 80: warning: exported method RedisClient.Ttl should have comment or be unexported (golint)
    • Line 86: warning: exported method RedisClient.SerializedLength should have comment or be unexported (golint)
    • Line 100: warning: exported method RedisClient.Close should have comment or be unexported (golint)
    • go-redis-memory-analysis/analysis_connection.go
    • Line 13: warning: exported type AnalysisConnection should have comment or be unexported (golint)
    • Line 18: warning: exported function NewAnalysisConnection should have comment or be unexported (golint)
    • Line 26: warning: exported method AnalysisConnection.Close should have comment or be unexported (golint)
    • Line 32: warning: exported method AnalysisConnection.Start should have comment or be unexported (golint)
    • Line 47: warning: should omit 2nd value from range; this loop is equivalent to `for db := range ...` (golint)
    • Line 115: warning: exported method AnalysisConnection.SaveReports should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!