core/cmd/cmd.go
Showing 3 of 3 total issues
Function Init
has 392 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func Init(ctx context.Context, flags *Flags, coreConfig *config.Config) { // init roles file, err := os.OpenFile(flags.RoleConfigFile, os.O_RDONLY, 0644) if err != nil { panic(err)
File cmd.go
has 664 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
// Copyright © 2023 Horizoncd.//// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.// You may obtain a copy of the License at
Function Init
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
Open
func Init(ctx context.Context, flags *Flags, coreConfig *config.Config) { // init roles file, err := os.OpenFile(flags.RoleConfigFile, os.O_RDONLY, 0644) if err != nil { panic(err)
- Read upRead up