Enhance Preload Functionality with Custom Joins and Add Comprehensive Tests #1542
reviewdog.yml
on: pull_request
runner / golangci-lint
18s
Annotations
2 errors
runner / golangci-lint:
callbacks/preload.go#L63
[golangci] reported by reviewdog 🐶
calculated cyclomatic complexity for function preloadEntryPoint is 23, max is 10 (cyclop)
Raw Output:
callbacks/preload.go:63:1: calculated cyclomatic complexity for function preloadEntryPoint is 23, max is 10 (cyclop)
func preloadEntryPoint(db *gorm.DB, joins []string, relationships *schema.Relationships, preloads map[string][]interface{}, associationsConds []interface{}, customJoin func(*gorm.DB) *gorm.DB) error {
^
|
runner / golangci-lint:
callbacks/preload.go#L158
[golangci] reported by reviewdog 🐶
calculated cyclomatic complexity for function preload is 38, max is 10 (cyclop)
Raw Output:
callbacks/preload.go:158:1: calculated cyclomatic complexity for function preload is 38, max is 10 (cyclop)
func preload(tx *gorm.DB, rel *schema.Relationship, conds []interface{}, preloads map[string][]interface{}, customJoin func(*gorm.DB) *gorm.DB) error {
^
|