Preparing report...

Report for github.com/neuronlabs/neuron

(v0.21.6)

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


gocyclo89%

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.

    • neuron/database/filters.go
    • Line 231: warning: cyclomatic complexity 28 of function reduceMany2ManyRelationshipFilter() is high (> 15) (gocyclo)
    • Line 159: warning: cyclomatic complexity 17 of function reduceHasManyRelationshipFilter() is high (> 15) (gocyclo)
    • neuron/mapping/map.go
    • Line 613: warning: cyclomatic complexity 47 of function getNestedStruct() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 47 of function (*ModelMap).setRelationships() is high (> 15) (gocyclo)
    • Line 99: warning: cyclomatic complexity 24 of function (*ModelMap).RegisterModels() is high (> 15) (gocyclo)
    • neuron/mapping/model-structs.go
    • Line 502: warning: cyclomatic complexity 37 of function (*ModelStruct).setAttribute() is high (> 15) (gocyclo)
    • Line 409: warning: cyclomatic complexity 20 of function (*ModelStruct).mapFields() is high (> 15) (gocyclo)
    • neuron/database/update.go
    • Line 204: warning: cyclomatic complexity 24 of function updateFilteredWithFind() is high (> 15) (gocyclo)
    • Line 117: warning: cyclomatic complexity 23 of function updateFiltered() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 20 of function updateModels() is high (> 15) (gocyclo)
    • neuron/database/insert.go
    • Line 14: warning: cyclomatic complexity 23 of function queryInsert() is high (> 15) (gocyclo)
    • Line 99: warning: cyclomatic complexity 18 of function createSingleInsertFieldSet() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 16 of function fieldsetPerModelInsertSetTimestamps() is high (> 15) (gocyclo)
    • Line 156: warning: cyclomatic complexity 16 of function singleFieldsetInsertSetTimestamps() is high (> 15) (gocyclo)
    • neuron/mapping/structfield.go
    • Line 398: warning: cyclomatic complexity 18 of function (*StructField).initCheckFieldType() is high (> 15) (gocyclo)
    • Line 529: warning: cyclomatic complexity 17 of function (*StructField).setTagValues() is high (> 15) (gocyclo)
    • neuron/database/find.go
    • Line 316: warning: cyclomatic complexity 27 of function findManyToManyRelation() is high (> 15) (gocyclo)
    • Line 243: warning: cyclomatic complexity 17 of function findHasRelation() is high (> 15) (gocyclo)
    • Line 136: warning: cyclomatic complexity 16 of function findBelongsToRelation() is high (> 15) (gocyclo)

golint95%

Golint is a linter for Go source code.

    • neuron/service/options.go
    • Line 91: warning: comment on exported function WithDefaultNotNullFields should be of the form "WithDefaultNotNullFields ..." (golint)
    • neuron/mapping/map.go
    • Line 24: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 45: warning: comment on exported method ModelMap.ModelByCollection should be of the form "ModelByCollection ..." (golint)
    • Line 55: warning: comment on exported method ModelMap.ModelStruct should be of the form "ModelStruct ..." (golint)
    • neuron/database/database.go
    • Line 58: warning: comment on exported type Database should be of the form "Database ..." (with optional leading article) (golint)
    • Line 179: warning: comment on exported method Database.Close should be of the form "Close ..." (golint)
    • Line 274: warning: comment on exported method Database.Now should be of the form "Now ..." (golint)
    • Line 294: warning: comment on exported method Database.QueryFind should be of the form "QueryFind ..." (golint)
    • Line 327: warning: comment on exported method Database.Delete should be of the form "Delete ..." (golint)
    • Line 359: warning: exported method Database.AddRelations should have comment or be unexported (golint)
    • Line 373: warning: comment on exported method Database.SetRelations should be of the form "SetRelations ..." (golint)
    • Line 410: warning: comment on exported method Database.IncludeRelations should be of the form "IncludeRelations ..." (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!