Preparing report...

Report for github.com/jhump/annogo

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


gocyclo50%

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.

    • annogo/registry.go
    • Line 844: warning: cyclomatic complexity 20 of function copyIfNeeded() is high (> 15) (gocyclo)
    • Line 767: warning: cyclomatic complexity 18 of function compatibleAdapter() is high (> 15) (gocyclo)
    • annogo/processor/expressions.go
    • Line 118: warning: cyclomatic complexity 122 of function (*Context).determineConstantValue() is high (> 15) (gocyclo)
    • Line 502: warning: cyclomatic complexity 24 of function constAssignableTo() is high (> 15) (gocyclo)
    • Line 635: warning: cyclomatic complexity 22 of function toToken() is high (> 15) (gocyclo)
    • annogo/processor/processor.go
    • Line 2018: warning: cyclomatic complexity 39 of function (*Context).convertType() is high (> 15) (gocyclo)
    • Line 1206: warning: cyclomatic complexity 34 of function (*Context).tryConvertValue() is high (> 15) (gocyclo)
    • Line 1492: warning: cyclomatic complexity 31 of function assignableToSpecial() is high (> 15) (gocyclo)
    • Line 392: warning: cyclomatic complexity 27 of function (*Context).computeAnnotationsFromFile() is high (> 15) (gocyclo)
    • Line 1614: warning: cyclomatic complexity 27 of function rewriteSelfType() is high (> 15) (gocyclo)
    • Line 1706: warning: cyclomatic complexity 27 of function (*Context).convertStructValue() is high (> 15) (gocyclo)
    • Line 1852: warning: cyclomatic complexity 25 of function (*Context).convertCompositeValue() is high (> 15) (gocyclo)
    • Line 488: warning: cyclomatic complexity 23 of function (*Context).computeAnnotationsFromType() is high (> 15) (gocyclo)
    • Line 738: warning: cyclomatic complexity 21 of function (*Context).resolveSymbol() is high (> 15) (gocyclo)
    • Line 1579: warning: cyclomatic complexity 18 of function containsSpecialType() is high (> 15) (gocyclo)
    • Line 796: warning: cyclomatic complexity 18 of function (*Context).getMetadata() is high (> 15) (gocyclo)
    • Line 673: warning: cyclomatic complexity 16 of function (*Context).convertAnnotation() is high (> 15) (gocyclo)
    • Line 952: warning: cyclomatic complexity 16 of function (*Context).getFieldMetadata() is high (> 15) (gocyclo)

golint85%

Golint is a linter for Go source code.

    • annogo/processor/processor.go
    • Line 625: 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)
    • Line 666: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1199: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1321: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1950: warning: exported method Context.GetValue 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!