Preparing report...

Report for github.com/coccyx/gogen

A    Great!    Found 18 issues across 71 files

Tweet

gofmt91%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


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!


gocyclo91%

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.

    • gogen/main.go
    • Line 186: warning: cyclomatic complexity 40 of function main() is high (> 15) (gocyclo)
    • Line 55: warning: cyclomatic complexity 30 of function Setup() is high (> 15) (gocyclo)
    • gogen/internal/config.go
    • Line 556: warning: cyclomatic complexity 100 of function (*Config).validate() is high (> 15) (gocyclo)
    • Line 162: warning: cyclomatic complexity 56 of function BuildConfig() is high (> 15) (gocyclo)
    • Line 1034: warning: cyclomatic complexity 37 of function (*Config).SetupSystemTokens() is high (> 15) (gocyclo)
    • gogen/internal/share.go
    • Line 104: warning: cyclomatic complexity 34 of function Pull() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 19 of function PullFile() is high (> 15) (gocyclo)

golint95%

Golint is a linter for Go source code.

    • gogen/internal/sample.go
    • Line 153: 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)

license0%

Checks whether your project has a LICENSE file.


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.

    • gogen/template/template_test.go
    • Line 13: warning: ineffectual assignment to temp (ineffassign)
    • Line 17: warning: ineffectual assignment to err (ineffassign)
    • Line 18: warning: ineffectual assignment to err (ineffassign)
    • Line 22: warning: ineffectual assignment to err (ineffassign)
    • Line 23: warning: ineffectual assignment to err (ineffassign)
    • Line 27: warning: ineffectual assignment to err (ineffassign)
    • Line 28: warning: ineffectual assignment to err (ineffassign)
    • Line 32: warning: ineffectual assignment to err (ineffassign)
    • Line 33: warning: ineffectual assignment to err (ineffassign)
    • Line 36: warning: ineffectual assignment to err (ineffassign)
    • Line 37: warning: ineffectual assignment to err (ineffassign)
    • Line 41: warning: ineffectual assignment to err (ineffassign)
    • Line 42: warning: ineffectual assignment to err (ineffassign)

misspell98%

Misspell Finds commonly misspelled English words