pkg/application/gitrepo/gitrepo_applicationv2.go
Showing 6 of 6 total issues
Method appGitopsRepo.CreateOrUpdateApplication
has 108 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (g appGitopsRepo) CreateOrUpdateApplication(ctx context.Context, application string, req CreateOrUpdateRequest) error { const op = "gitlab repo: create or update application" defer wlog.Start(ctx, op).StopPrint()
Method appGitopsRepo.CreateOrUpdateApplication
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
Open
func (g appGitopsRepo) CreateOrUpdateApplication(ctx context.Context, application string, req CreateOrUpdateRequest) error { const op = "gitlab repo: create or update application" defer wlog.Start(ctx, op).StopPrint()
- Read upRead up
Method appGitopsRepo.GetApplication
has 56 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (g appGitopsRepo) GetApplication(ctx context.Context, application, environment string) (*GetResponse, error) { const op = "gitlab repo: get application" defer wlog.Start(ctx, op).StopPrint() // 1. get data from gitlab
Method appGitopsRepo.CreateOrUpdateApplication
has 12 return statements (exceeds 4 allowed). Open
Open
func (g appGitopsRepo) CreateOrUpdateApplication(ctx context.Context, application string, req CreateOrUpdateRequest) error { const op = "gitlab repo: create or update application" defer wlog.Start(ctx, op).StopPrint()
Method appGitopsRepo.GetApplication
has 9 return statements (exceeds 4 allowed). Open
Open
func (g appGitopsRepo) GetApplication(ctx context.Context, application, environment string) (*GetResponse, error) { const op = "gitlab repo: get application" defer wlog.Start(ctx, op).StopPrint() // 1. get data from gitlab
Method appGitopsRepo.GetApplication
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
Open
func (g appGitopsRepo) GetApplication(ctx context.Context, application, environment string) (*GetResponse, error) { const op = "gitlab repo: get application" defer wlog.Start(ctx, op).StopPrint() // 1. get data from gitlab
- Read upRead up