Preparing report...

Report for github.com/segmentio/cli

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


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.

    • cli/command.go
    • Line 187: warning: cyclomatic complexity 41 of function (*CommandFunc).Call() is high (> 15) (gocyclo)
    • Line 337: warning: cyclomatic complexity 25 of function (*CommandFunc).Format() is high (> 15) (gocyclo)
    • Line 113: warning: cyclomatic complexity 19 of function (*CommandFunc).configure() is high (> 15) (gocyclo)
    • cli/decode.go
    • Line 180: warning: cyclomatic complexity 20 of function makeValueDecoder() is high (> 15) (gocyclo)

golint74%

Golint is a linter for Go source code.

    • cli/human/bytes.go
    • Line 34: warning: exported const B should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported function ParseBytes should have comment or be unexported (golint)
    • Line 60: warning: exported function ParseBytesFloat64 should have comment or be unexported (golint)
    • Line 125: warning: exported method Bytes.GoString should have comment or be unexported (golint)
    • Line 176: warning: exported method Bytes.MarshalJSON should have comment or be unexported (golint)
    • Line 180: warning: exported method Bytes.UnmarshalJSON should have comment or be unexported (golint)
    • Line 184: warning: exported method Bytes.MarshalYAML should have comment or be unexported (golint)
    • Line 188: warning: exported method Bytes.UnmarshalYAML should have comment or be unexported (golint)
    • Line 201: warning: exported method Bytes.MarshalText should have comment or be unexported (golint)
    • Line 205: warning: exported method Bytes.UnmarshalText should have comment or be unexported (golint)
    • cli/human/count.go
    • Line 26: warning: exported const K should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported function ParseCount should have comment or be unexported (golint)
    • Line 84: warning: exported method Count.GoString should have comment or be unexported (golint)
    • Line 121: warning: exported method Count.MarshalJSON should have comment or be unexported (golint)
    • Line 125: warning: exported method Count.UnmarshalJSON should have comment or be unexported (golint)
    • Line 129: warning: exported method Count.MarshalYAML should have comment or be unexported (golint)
    • Line 133: warning: exported method Count.UnmarshalYAML should have comment or be unexported (golint)
    • Line 146: warning: exported method Count.MarshalText should have comment or be unexported (golint)
    • Line 150: warning: exported method Count.UnmarshalText should have comment or be unexported (golint)
    • cli/human/number.go
    • Line 27: warning: exported function ParseNumber should have comment or be unexported (golint)
    • Line 72: warning: exported method Number.GoString should have comment or be unexported (golint)
    • Line 106: warning: exported method Number.MarshalJSON should have comment or be unexported (golint)
    • Line 110: warning: exported method Number.UnmarshalJSON should have comment or be unexported (golint)
    • Line 114: warning: exported method Number.MarshalYAML should have comment or be unexported (golint)
    • Line 118: warning: exported method Number.UnmarshalYAML should have comment or be unexported (golint)
    • Line 122: warning: exported method Number.MarshalText should have comment or be unexported (golint)
    • Line 126: warning: exported method Number.UnmarshalText should have comment or be unexported (golint)
    • cli/human/ratio.go
    • Line 27: warning: exported function ParseRatio should have comment or be unexported (golint)
    • Line 44: warning: exported method Ratio.GoString should have comment or be unexported (golint)
    • Line 82: warning: exported method Ratio.Text should have comment or be unexported (golint)
    • Line 91: warning: exported method Ratio.Formatter should have comment or be unexported (golint)
    • Line 95: warning: exported method Ratio.MarshalJSON should have comment or be unexported (golint)
    • Line 99: warning: exported method Ratio.UnmarshalJSON should have comment or be unexported (golint)
    • Line 103: warning: exported method Ratio.MarshalYAML should have comment or be unexported (golint)
    • Line 107: warning: exported method Ratio.UnmarshalYAML should have comment or be unexported (golint)
    • Line 120: warning: exported method Ratio.MarshalText should have comment or be unexported (golint)
    • Line 124: warning: exported method Ratio.UnmarshalText should have comment or be unexported (golint)
    • cli/human/boolean.go
    • Line 20: warning: exported function ParseBoolean should have comment or be unexported (golint)
    • Line 88: warning: exported method Boolean.MarshalJSON should have comment or be unexported (golint)
    • Line 92: warning: exported method Boolean.UnmarshalJSON should have comment or be unexported (golint)
    • Line 96: warning: exported method Boolean.MarshalYAML should have comment or be unexported (golint)
    • Line 100: warning: exported method Boolean.UnmarshalYAML should have comment or be unexported (golint)
    • Line 104: warning: exported method Boolean.MarshalText should have comment or be unexported (golint)
    • Line 108: warning: exported method Boolean.UnmarshalText should have comment or be unexported (golint)
    • cli/human/duration.go
    • Line 17: warning: exported const Nanosecond should have comment (or a comment on this block) or be unexported (golint)
    • Line 50: warning: exported function ParseDuration should have comment or be unexported (golint)
    • Line 54: warning: exported function ParseDurationUntil should have comment or be unexported (golint)
    • Line 166: warning: exported method Duration.GoString should have comment or be unexported (golint)
    • Line 220: warning: exported method Duration.Text should have comment or be unexported (golint)
    • Line 301: warning: exported method Duration.Formatter should have comment or be unexported (golint)
    • Line 305: warning: exported method Duration.MarshalJSON should have comment or be unexported (golint)
    • Line 309: warning: exported method Duration.UnmarshalJSON should have comment or be unexported (golint)
    • Line 313: warning: exported method Duration.MarshalYAML should have comment or be unexported (golint)
    • Line 317: warning: exported method Duration.UnmarshalYAML should have comment or be unexported (golint)
    • Line 330: warning: exported method Duration.MarshalText should have comment or be unexported (golint)
    • Line 334: warning: exported method Duration.UnmarshalText should have comment or be unexported (golint)
    • Line 343: warning: exported method Duration.Nanoseconds should have comment or be unexported (golint)
    • Line 345: warning: exported method Duration.Microseconds should have comment or be unexported (golint)
    • Line 347: warning: exported method Duration.Milliseconds should have comment or be unexported (golint)
    • Line 349: warning: exported method Duration.Seconds should have comment or be unexported (golint)
    • Line 351: warning: exported method Duration.Minutes should have comment or be unexported (golint)
    • Line 353: warning: exported method Duration.Hours should have comment or be unexported (golint)
    • Line 355: warning: exported method Duration.Days should have comment or be unexported (golint)
    • Line 357: warning: exported method Duration.Weeks should have comment or be unexported (golint)
    • Line 359: warning: exported method Duration.Months should have comment or be unexported (golint)
    • Line 375: warning: exported method Duration.Years should have comment or be unexported (golint)
    • cli/human/rate.go
    • Line 29: warning: exported const PerNanosecond should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported function ParseRate should have comment or be unexported (golint)
    • Line 84: warning: exported method Rate.GoString should have comment or be unexported (golint)
    • Line 122: warning: exported method Rate.Text should have comment or be unexported (golint)
    • Line 148: warning: exported method Rate.Formatter should have comment or be unexported (golint)
    • Line 152: warning: exported method Rate.MarshalJSON should have comment or be unexported (golint)
    • Line 156: warning: exported method Rate.UnmarshalJSON should have comment or be unexported (golint)
    • Line 160: warning: exported method Rate.MarshalYAML should have comment or be unexported (golint)
    • Line 164: warning: exported method Rate.UnmarshalYAML should have comment or be unexported (golint)
    • Line 177: warning: exported method Rate.MarshalText should have comment or be unexported (golint)
    • Line 181: warning: exported method Rate.UnmarshalText should have comment or be unexported (golint)
    • cli/human/time.go
    • Line 28: warning: exported function ParseTime should have comment or be unexported (golint)
    • Line 32: warning: exported function ParseTimeAt should have comment or be unexported (golint)
    • Line 81: warning: exported method Time.IsZero should have comment or be unexported (golint)
    • Line 89: warning: exported method Time.GoString should have comment or be unexported (golint)
    • Line 129: warning: exported method Time.Text should have comment or be unexported (golint)
    • Line 148: warning: exported method Time.Formatter should have comment or be unexported (golint)
    • Line 152: warning: exported method Time.MarshalJSON should have comment or be unexported (golint)
    • Line 156: warning: exported method Time.UnmarshalJSON should have comment or be unexported (golint)
    • Line 160: warning: exported method Time.MarshalYAML should have comment or be unexported (golint)
    • Line 164: warning: exported method Time.UnmarshalYAML should have comment or be unexported (golint)
    • Line 177: warning: exported method Time.MarshalText should have comment or be unexported (golint)
    • Line 181: warning: exported method Time.UnmarshalText 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!


misspell94%

Misspell Finds commonly misspelled English words