Preparing report...

Report for github.com/unjello/docker-stats-go

B    Not bad!    Found 2 issues across 2 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!


gocyclo50%

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.


golint0%

Golint is a linter for Go source code.

    • docker-stats-go/calculate-stats.go
    • Line 7: warning: comment on exported function CalculateCPUPercentage should be of the form "CalculateCPUPercentage ..." (golint)
    • Line 40: warning: exported function CalculateMemoryUsage should have comment or be unexported (golint)
    • Line 54: warning: exported function CalculateMemoryLimit should have comment or be unexported (golint)
    • Line 65: warning: exported function CalculateMemoryPercentage should have comment or be unexported (golint)
    • docker-stats-go/main.go
    • Line 49: warning: exported type CalculatedStats should have comment or be unexported (golint)
    • Line 60: warning: exported method CalculatedStats.Strings should have comment or be unexported (golint)
    • Line 82: warning: exported function Header should have comment or be unexported (golint)
    • Line 86: warning: exported type Options should have comment or be unexported (golint)
    • Line 92: warning: exported method Options.Init should have comment or be unexported (golint)
    • Line 97: warning: exported method Options.Parse should have comment or be unexported (golint)
    • Line 115: warning: exported type Writer should have comment or be unexported (golint)
    • Line 121: warning: exported type TableWriter should have comment or be unexported (golint)
    • Line 125: warning: exported function NewTableWriter should have comment or be unexported (golint)
    • Line 133: warning: exported method TableWriter.WriteS should have comment or be unexported (golint)
    • Line 138: warning: exported method TableWriter.Flush should have comment or be unexported (golint)
    • Line 140: warning: exported type JsonWriter should have comment or be unexported (golint)
    • Line 144: warning: exported function NewJsonWriter should have comment or be unexported (golint)
    • Line 151: warning: exported method JsonWriter.WriteS should have comment or be unexported (golint)
    • Line 154: warning: exported method JsonWriter.Flush should have comment or be unexported (golint)
    • Line 156: warning: exported type CsvWriter should have comment or be unexported (golint)
    • Line 160: warning: exported function NewCsvWriter should have comment or be unexported (golint)
    • Line 168: warning: exported method CsvWriter.WriteS should have comment or be unexported (golint)
    • Line 172: warning: exported method CsvWriter.Flush should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

    • docker-stats-go/main.go
    • Line 19: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 19: warning: could not import github.com/docker/docker/client (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import github.com/docker/go-units (invalid package name: "") (ineffassign)
    • Line 21: warning: could not import github.com/spf13/pflag (invalid package name: "") (ineffassign)
    • Line 69: warning: undeclared name: units (ineffassign)
    • Line 70: warning: undeclared name: units (ineffassign)
    • Line 20: warning: "github.com/docker/go-units" imported but not used (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!