Preparing report...

Report for github.com/carlos-gi/gorm

(v1.9.4)

A+    Excellent!    Found 24 issues across 52 files

Tweet

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!


gofmt88%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo55%

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.

    • naming.go
    • Line 71: warning: cyclomatic complexity 16 of function defaultNamer() is high (> 15) (gocyclo)
    • main_test.go
    • Line 280: warning: cyclomatic complexity 16 of function TestNullValues() is high (> 15) (gocyclo)
    • model_struct.go
    • Line 148: warning: cyclomatic complexity 111 of function (*Scope).GetModelStruct() is high (> 15) (gocyclo)
    • callback_query_preload.go
    • Line 12: warning: cyclomatic complexity 22 of function preloadCallback() is high (> 15) (gocyclo)
    • Line 286: warning: cyclomatic complexity 20 of function (*Scope).handleManyToManyPreload() is high (> 15) (gocyclo)
    • preload_test.go
    • Line 852: warning: cyclomatic complexity 16 of function TestManyToManyPreloadWithMultiPrimaryKeys() is high (> 15) (gocyclo)
    • polymorphic_test.go
    • Line 45: warning: cyclomatic complexity 32 of function TestPolymorphic() is high (> 15) (gocyclo)
    • Line 228: warning: cyclomatic complexity 28 of function TestNamedPolymorphic() is high (> 15) (gocyclo)
    • association_test.go
    • Line 13: warning: cyclomatic complexity 32 of function TestBelongsTo() is high (> 15) (gocyclo)
    • Line 226: warning: cyclomatic complexity 25 of function TestHasOne() is high (> 15) (gocyclo)
    • Line 597: warning: cyclomatic complexity 25 of function TestManyToMany() is high (> 15) (gocyclo)
    • Line 415: warning: cyclomatic complexity 22 of function TestHasMany() is high (> 15) (gocyclo)
    • Line 725: warning: cyclomatic complexity 18 of function TestRelated() is high (> 15) (gocyclo)
    • Line 811: warning: cyclomatic complexity 17 of function TestForeignKey() is high (> 15) (gocyclo)
    • query_test.go
    • Line 639: warning: cyclomatic complexity 28 of function TestFindOrCreate() is high (> 15) (gocyclo)
    • Line 595: warning: cyclomatic complexity 24 of function TestFindOrInitialize() is high (> 15) (gocyclo)
    • multi_primary_keys_test.go
    • Line 238: warning: cyclomatic complexity 26 of function TestManyToManyWithCustomizedForeignKeys2() is high (> 15) (gocyclo)
    • Line 121: warning: cyclomatic complexity 20 of function TestManyToManyWithCustomizedForeignKeys() is high (> 15) (gocyclo)
    • dialect_mysql.go
    • Line 31: warning: cyclomatic complexity 31 of function (*mysql).DataTypeOf() is high (> 15) (gocyclo)
    • callback.go
    • Line 153: warning: cyclomatic complexity 17 of function sortProcessors() is high (> 15) (gocyclo)
    • pointer_test.go
    • Line 17: warning: cyclomatic complexity 20 of function TestPointerFields() is high (> 15) (gocyclo)
    • dialect_common.go
    • Line 48: warning: cyclomatic complexity 18 of function (*commonDialect).DataTypeOf() is high (> 15) (gocyclo)
    • scope.go
    • Line 528: warning: cyclomatic complexity 37 of function (*Scope).buildCondition() is high (> 15) (gocyclo)
    • Line 711: warning: cyclomatic complexity 16 of function (*Scope).whereSQL() is high (> 15) (gocyclo)
    • callback_save.go
    • Line 98: warning: cyclomatic complexity 28 of function saveAfterAssociationsCallback() is high (> 15) (gocyclo)
    • Line 16: warning: cyclomatic complexity 16 of function saveAssociationCheck() is high (> 15) (gocyclo)
    • association.go
    • Line 130: warning: cyclomatic complexity 24 of function (*Association).Delete() is high (> 15) (gocyclo)
    • Line 36: warning: cyclomatic complexity 20 of function (*Association).Replace() is high (> 15) (gocyclo)
    • Line 301: warning: cyclomatic complexity 16 of function (*Association).saveAssociations() is high (> 15) (gocyclo)

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!