Preparing report...

Report for github.com/guonaihong/clop

A+    Excellent!    Found 4 issues across 21 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!


gocyclo90%

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.

    • clop/clop.go
    • Line 639: warning: cyclomatic complexity 28 of function (*Clop).parseTagAndSetOption() is high (> 15) (gocyclo)
    • Line 365: warning: cyclomatic complexity 24 of function (*Clop).parseShort() is high (> 15) (gocyclo)
    • Line 737: warning: cyclomatic complexity 19 of function (*Clop).registerCore() is high (> 15) (gocyclo)
    • Line 509: warning: cyclomatic complexity 17 of function (*Clop).genHelpMessage() is high (> 15) (gocyclo)
    • clop/tag.go
    • Line 18: warning: cyclomatic complexity 24 of function Unquote() is high (> 15) (gocyclo)
    • Line 94: warning: cyclomatic complexity 22 of function (Tag).Lookup() is high (> 15) (gocyclo)

golint80%

Golint is a linter for Go source code.

    • clop/tag.go
    • Line 10: warning: exported var ErrNotPointerType should have comment or be unexported (golint)
    • Line 11: warning: exported var ErrUnsupportedType should have comment or be unexported (golint)
    • Line 17: warning: comment on exported function Unquote should be of the form "Unquote ..." (golint)
    • Line 91: warning: exported type Tag should have comment or be unexported (golint)
    • Line 93: warning: comment on exported method Tag.Lookup should be of the form "Lookup ..." (golint)
    • Line 144: warning: exported method Tag.Get should have comment or be unexported (golint)
    • clop/utils.go
    • Line 8: warning: exported function StringToBytes should have comment or be unexported (golint)
    • clop/clop.go
    • Line 16: warning: exported var ErrDuplicateOptions should have comment or be unexported (golint)
    • Line 17: warning: comment on exported var ErrUnsupported should be of the form "ErrUnsupported ..." (golint)
    • Line 24: warning: comment on exported var ShowUsageDefault should be of the form "ShowUsageDefault ..." (golint)
    • Line 33: warning: exported type Clop should have comment or be unexported (golint)
    • Line 58: warning: comment on exported type Subcommand should be of the form "Subcommand ..." (with optional leading article) (golint)
    • Line 64: warning: exported type Option should have comment or be unexported (golint)
    • Line 91: warning: exported function New should have comment or be unexported (golint)
    • Line 115: warning: comment on exported method Clop.SetExit should be of the form "SetExit ..." (golint)
    • Line 121: warning: exported method Clop.SetOutput should have comment or be unexported (golint)
    • Line 126: warning: comment on exported method Clop.SetProcName should be of the form "SetProcName ..." (golint)
    • Line 132: warning: exported method Clop.IsSetSubcommand should have comment or be unexported (golint)
    • Line 137: warning: exported method Clop.GetIndex should have comment or be unexported (golint)
    • Line 588: warning: exported method Clop.Usage should have comment or be unexported (golint)
    • Line 903: warning: exported method Clop.Bind should have comment or be unexported (golint)
    • Line 942: warning: exported function Usage should have comment or be unexported (golint)
    • Line 946: warning: exported function Bind should have comment or be unexported (golint)
    • Line 951: warning: exported function IsSetSubcommand should have comment or be unexported (golint)
    • Line 955: warning: exported function GetIndex should have comment or be unexported (golint)
    • Line 959: warning: exported var CommandLine 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!