pkg/admission/webhook.go
Showing 4 of 4 total issues
Function Validating
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
Open
func Validating(ctx context.Context, request *Request) error { if len(validatingWebhooks) < 1 { return nil } ctx, cancelFunc := context.WithCancel(ctx)
- Read upRead up
Function Validating
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func Validating(ctx context.Context, request *Request) error { if len(validatingWebhooks) < 1 { return nil } ctx, cancelFunc := context.WithCancel(ctx)
Function Validating
has 9 return statements (exceeds 4 allowed). Open
Open
func Validating(ctx context.Context, request *Request) error { if len(validatingWebhooks) < 1 { return nil } ctx, cancelFunc := context.WithCancel(ctx)
Function jsonPatch
has 5 return statements (exceeds 4 allowed). Open
Open
func jsonPatch(obj interface{}, patchJSON []byte) (interface{}, error) { objJSON, err := json.Marshal(obj) if err != nil { return nil, err }