Preparing report...

Report for github.com/Cloud-Foundations/tricorder

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


golint66%

Golint is a linter for Go source code.

    • tricorder/go/tricorder/types/api.go
    • Line 15: warning: exported const Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported const Time should be of the form "Time ..." (golint)
    • Line 34: warning: comment on exported const Duration should be of the form "Duration ..." (golint)
    • Line 304: warning: exported method Type.IsInt should have comment or be unexported (golint)
    • Line 308: warning: exported method Type.IsUint should have comment or be unexported (golint)
    • Line 312: warning: exported method Type.IsFloat should have comment or be unexported (golint)
    • Line 316: warning: exported method Type.Bits should have comment or be unexported (golint)
    • tricorder/go/tricorder/api.go
    • Line 19: warning: comment on exported var ErrNotFound should be of the form "ErrNotFound ..." (golint)
    • Line 21: warning: comment on exported var ErrPathInUse should be of the form "ErrPathInUse ..." (golint)
    • Line 23: warning: comment on exported var ErrWrongUnit should be of the form "ErrWrongUnit ..." (golint)
    • Line 25: warning: comment on exported var ErrWrongType should be of the form "ErrWrongType ..." (golint)
    • Line 48: warning: comment on exported type Group should be of the form "Group ..." (with optional leading article) (golint)
    • Line 64: warning: comment on exported var DefaultGroup should be of the form "DefaultGroup ..." (golint)
    • Line 157: warning: comment on exported var PowersOfTwo should be of the form "PowersOfTwo ..." (golint)
    • Line 159: warning: comment on exported var PowersOfFour should be of the form "PowersOfFour ..." (golint)
    • Line 161: warning: comment on exported var PowersOfTen should be of the form "PowersOfTen ..." (golint)
    • Line 228: warning: comment on exported type NonCumulativeDistribution should be of the form "NonCumulativeDistribution ..." (with optional leading article) (golint)
    • Line 255: warning: receiver name d should be consistent with previous receiver name c for NonCumulativeDistribution (golint)
    • Line 259: warning: comment on exported method NonCumulativeDistribution.UpdateMinMax should be of the form "UpdateMinMax ..." (golint)
    • Line 272: warning: receiver name d should be consistent with previous receiver name c for NonCumulativeDistribution (golint)
    • Line 287: warning: receiver name d should be consistent with previous receiver name c for NonCumulativeDistribution (golint)
    • Line 292: warning: receiver name d should be consistent with previous receiver name c for NonCumulativeDistribution (golint)
    • Line 297: warning: receiver name d should be consistent with previous receiver name c for NonCumulativeDistribution (golint)
    • Line 302: warning: comment on exported const MutableSlice should be of the form "MutableSlice ..." (golint)
    • Line 304: warning: comment on exported const ImmutableSlice should be of the form "ImmutableSlice ..." (golint)
    • Line 411: warning: comment on exported method DirectorySpec.AbsPath should be of the form "AbsPath ..." (golint)
    • tricorder/go/tricorder/setup.go
    • Line 82: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • tricorder/go/tricorder/units/api.go
    • Line 8: warning: exported const Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported function FromSeconds should be of the form "FromSeconds ..." (golint)
    • tricorder/go/tricorder/messages/api.go
    • Line 15: warning: comment on exported var ErrMetricNotFound should be of the form "ErrMetricNotFound ..." (golint)
    • Line 55: warning: exported method Distribution.Type should have comment or be unexported (golint)
    • Line 161: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • tricorder/go/tricorder/metric_test.go
    • Line 26: warning: error var kCallbackError should have name of the form errFoo (golint)
    • Line 349: warning: var inSeconds is of type time.Duration; don't use unit-specific suffix "Seconds" (golint)
    • Line 350: warning: var inMilliseconds is of type time.Duration; don't use unit-specific suffix "Milliseconds" (golint)

gocyclo81%

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.

    • tricorder/go/tricorder/types/api.go
    • Line 53: warning: cyclomatic complexity 31 of function FromGoValueWithSubType() is high (> 15) (gocyclo)
    • Line 134: warning: cyclomatic complexity 17 of function (Type).SafeZeroValue() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 16 of function (Type).SafeNilSlice() is high (> 15) (gocyclo)
    • tricorder/go/tricorder/metric.go
    • Line 757: warning: cyclomatic complexity 26 of function getPrimitiveType() is high (> 15) (gocyclo)
    • Line 1294: warning: cyclomatic complexity 18 of function valueToHtmlString() is high (> 15) (gocyclo)
    • Line 1207: warning: cyclomatic complexity 17 of function valueToTextString() is high (> 15) (gocyclo)

ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words