Preparing report...

Report for github.com/jonbodner/proteus

A+    Excellent!    Found 19 issues across 30 files

Tweet

gofmt93%

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!


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.

    • proteus/builder.go
    • Line 232: warning: cyclomatic complexity 26 of function validIdentifier() is high (> 15) (gocyclo)
    • Line 66: warning: cyclomatic complexity 22 of function buildFixedQueryAndParamOrder() is high (> 15) (gocyclo)
    • proteus/proteus.go
    • Line 269: warning: cyclomatic complexity 22 of function validateFunction() is high (> 15) (gocyclo)
    • Line 85: warning: cyclomatic complexity 19 of function ShouldBuild() is high (> 15) (gocyclo)

golint53%

Golint is a linter for Go source code.

    • proteus/speed/speed.go
    • Line 17: warning: exported function SelectProteus should have comment or be unexported (golint)
    • Line 51: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 64: warning: exported function SelectNative should have comment or be unexported (golint)
    • Line 93: warning: exported type BenchProduct should have comment or be unexported (golint)
    • Line 99: warning: exported type BenchProductDao should have comment or be unexported (golint)
    • proteus/logger/logger.go
    • Line 14: warning: exported type Level should have comment or be unexported (golint)
    • Line 17: warning: exported const OFF should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported method Level.MarshalJSON should have comment or be unexported (golint)
    • Line 58: warning: exported type Pair should have comment or be unexported (golint)
    • Line 63: warning: exported type Logger should have comment or be unexported (golint)
    • Line 67: warning: exported type LoggerFunc should have comment or be unexported (golint)
    • Line 69: warning: exported method LoggerFunc.Log should have comment or be unexported (golint)
    • Line 76: warning: exported function Config should have comment or be unexported (golint)
    • Line 82: warning: exported function WithLevel should have comment or be unexported (golint)
    • Line 86: warning: exported function WithValues should have comment or be unexported (golint)
    • Line 97: warning: exported function LevelFromContext should have comment or be unexported (golint)
    • Line 104: warning: exported function ValuesFromContext should have comment or be unexported (golint)
    • Line 111: warning: exported function Log should have comment or be unexported (golint)
    • Line 139: warning: exported type Formatter should have comment or be unexported (golint)
    • Line 143: warning: exported type FormatterFunc should have comment or be unexported (golint)
    • Line 145: warning: exported method FormatterFunc.Format should have comment or be unexported (golint)
    • Line 149: warning: exported type DefaultLogger should have comment or be unexported (golint)
    • Line 154: warning: exported method DefaultLogger.Log should have comment or be unexported (golint)
    • proteus/mapper/extract.go
    • Line 14: warning: exported function ExtractType should have comment or be unexported (golint)
    • Line 47: warning: exported function Extract should have comment or be unexported (golint)
    • proteus/adapter.go
    • Line 7: warning: exported function MySQL should have comment or be unexported (golint)
    • Line 11: warning: exported function Sqlite should have comment or be unexported (golint)
    • Line 15: warning: exported function Postgres should have comment or be unexported (golint)
    • Line 19: warning: exported function Oracle should have comment or be unexported (golint)
    • proteus/proteus_function.go
    • Line 15: warning: exported type Builder should have comment or be unexported (golint)
    • Line 20: warning: exported function NewBuilder should have comment or be unexported (golint)
    • Line 27: warning: exported method Builder.BuildFunction should have comment or be unexported (golint)
    • Line 94: warning: exported method Builder.Exec should have comment or be unexported (golint)
    • Line 103: warning: exported method Builder.ExecResult should have comment or be unexported (golint)
    • Line 121: warning: exported method Builder.Query should have comment or be unexported (golint)
    • proteus/cmd/sample/main.go
    • Line 14: warning: exported type Product should have comment or be unexported (golint)
    • Line 28: warning: exported type ProductDAO should have comment or be unexported (golint)
    • proteus/cmd/null/main.go
    • Line 14: warning: exported type Product2 should have comment or be unexported (golint)
    • Line 28: warning: exported type Product2Dao should have comment or be unexported (golint)
    • proteus/mapper/mapper.go
    • Line 37: warning: exported function MakeBuilder should have comment or be unexported (golint)
    • Line 121: warning: exported type Builder should have comment or be unexported (golint)
    • proteus/proteus.go
    • Line 55: warning: exported type Error should have comment or be unexported (golint)
    • Line 72: warning: exported function SetLogLevel should have comment or be unexported (golint)
    • proteus/query_mappers.go
    • Line 9: warning: exported type MapMapper should have comment or be unexported (golint)
    • Line 11: warning: exported method MapMapper.Map should have comment or be unexported (golint)
    • Line 23: warning: exported function PropFileToQueryMapper should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.

    • proteus/bench_test.go
    • Line 72: warning: ineffectual assignment to count (ineffassign)
    • Line 77: warning: ineffectual assignment to count (ineffassign)
    • Line 82: warning: ineffectual assignment to count (ineffassign)
    • Line 87: warning: ineffectual assignment to count (ineffassign)
    • Line 92: warning: ineffectual assignment to person (ineffassign)
    • Line 97: warning: ineffectual assignment to people (ineffassign)
    • Line 107: warning: ineffectual assignment to count (ineffassign)
    • Line 112: warning: ineffectual assignment to person (ineffassign)
    • Line 117: warning: ineffectual assignment to count (ineffassign)
    • Line 263: warning: ineffectual assignment to count (ineffassign)
    • Line 268: warning: ineffectual assignment to count (ineffassign)
    • Line 273: warning: ineffectual assignment to count (ineffassign)
    • Line 278: warning: ineffectual assignment to count (ineffassign)
    • Line 283: warning: ineffectual assignment to person (ineffassign)
    • Line 288: warning: ineffectual assignment to people (ineffassign)
    • Line 298: warning: ineffectual assignment to count (ineffassign)
    • Line 303: warning: ineffectual assignment to person (ineffassign)
    • Line 308: warning: ineffectual assignment to count (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!