Preparing report...

Report for github.com/yunabe/lgo

A+    Excellent!    Found 20 issues across 57 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!


gocyclo84%

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.

    • lgo/go/go/printer/nodes.go
    • Line 689: warning: cyclomatic complexity 57 of function (*printer).expr1() is high (> 15) (gocyclo)
    • Line 1116: warning: cyclomatic complexity 40 of function (*printer).stmt() is high (> 15) (gocyclo)
    • Line 124: warning: cyclomatic complexity 39 of function (*printer).exprList() is high (> 15) (gocyclo)
    • Line 388: warning: cyclomatic complexity 32 of function (*printer).fieldList() is high (> 15) (gocyclo)
    • Line 521: warning: cyclomatic complexity 19 of function walkBinary() is high (> 15) (gocyclo)
    • lgo/parser/parser.go
    • Line 2160: warning: cyclomatic complexity 22 of function (*parser).parseStmtWithFuncDeclImport() is high (> 15) (gocyclo)
    • Line 1461: warning: cyclomatic complexity 18 of function (*parser).parsePrimaryExpr() is high (> 15) (gocyclo)
    • Line 1364: warning: cyclomatic complexity 16 of function (*parser).checkExpr() is high (> 15) (gocyclo)
    • lgo/converter/converter.go
    • Line 1052: warning: cyclomatic complexity 42 of function finalCheckAndRename() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 36 of function convertToPhase2() is high (> 15) (gocyclo)
    • Line 671: warning: cyclomatic complexity 31 of function getDocOrGoDocQuery() is high (> 15) (gocyclo)
    • Line 122: warning: cyclomatic complexity 19 of function convertToPhase1() is high (> 15) (gocyclo)
    • Line 983: warning: cyclomatic complexity 17 of function workaroundGoBug22998() is high (> 15) (gocyclo)
    • lgo/go/go/printer/printer.go
    • Line 334: warning: cyclomatic complexity 32 of function (*printer).writeCommentPrefix() is high (> 15) (gocyclo)
    • Line 871: warning: cyclomatic complexity 27 of function (*printer).print() is high (> 15) (gocyclo)
    • Line 1068: warning: cyclomatic complexity 26 of function (*printer).printNode() is high (> 15) (gocyclo)
    • Line 489: warning: cyclomatic complexity 26 of function stripCommonPrefix() is high (> 15) (gocyclo)
    • Line 738: warning: cyclomatic complexity 19 of function (*printer).intersperseComments() is high (> 15) (gocyclo)
    • Line 1199: warning: cyclomatic complexity 18 of function (*trimmer).Write() is high (> 15) (gocyclo)

golint82%

Golint is a linter for Go source code.

    • lgo/cmd/lgo/install/main.go
    • Line 66: warning: exported function InstallMain should have comment or be unexported (golint)
    • Line 126: warning: exported function InstallPkgMain should have comment or be unexported (golint)
    • lgo/cmd/runner/runner.go
    • Line 69: warning: exported type LgoRunner should have comment or be unexported (golint)
    • Line 77: warning: exported function NewLgoRunner should have comment or be unexported (golint)
    • Line 86: warning: exported method LgoRunner.ExecCount should have comment or be unexported (golint)
    • Line 153: warning: exported method LgoRunner.Run should have comment or be unexported (golint)
    • Line 212: warning: exported method LgoRunner.Complete should have comment or be unexported (golint)
    • lgo/cmd/install/install.go
    • Line 44: warning: exported function IsSOInstalled should have comment or be unexported (golint)
    • Line 50: warning: exported type SOInstaller should have comment or be unexported (golint)
    • Line 55: warning: exported function NewSOInstaller should have comment or be unexported (golint)
    • Line 72: warning: comment on exported method SOInstaller.Install should be of the form "Install ..." (golint)
    • lgo/cmd/runner/sessid.go
    • Line 13: warning: exported type SessionID should have comment or be unexported (golint)
    • Line 17: warning: exported function NewSessionID should have comment or be unexported (golint)
    • Line 21: warning: exported method SessionID.Marshal should have comment or be unexported (golint)
    • Line 31: warning: exported method SessionID.Unmarshal should have comment or be unexported (golint)
    • lgo/parser/custom.go
    • Line 8: warning: exported type LGOBlock should have comment or be unexported (golint)
    • Line 75: warning: exported function ParseLesserGoFile should have comment or be unexported (golint)
    • lgo/parser/interface.go
    • Line 56: warning: exported const PackageClauseOnly should have comment (or a comment on this block) or be unexported (golint)
    • lgo/cmd/lgo-internal/liner/liner.go
    • Line 107: warning: exported function ContinueLineString should have comment or be unexported (golint)
    • Line 111: warning: exported type Liner should have comment or be unexported (golint)
    • Line 117: warning: exported function NewLiner should have comment or be unexported (golint)
    • Line 123: warning: exported method Liner.Next should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words