Skip to content

Commit

Permalink
Fixed lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Casey Morton <[email protected]>
  • Loading branch information
Casey Morton committed Oct 25, 2023
1 parent dc3eb82 commit 5a8d3b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions pkg/argocd/argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ func FilterApplicationsForUpdate(apps []v1alpha1.Application, patterns []string,
logCtx.Debugf("Skipping app '%s' because it does not carry requested label", app.GetName())
continue
}
for sourceIndex, _ := range getApplicationTypes(&app) {
for sourceIndex := range getApplicationTypes(&app) {
// Check for valid application type
if !IsValidApplicationTypeForSource(&app, sourceIndex) {
logCtx.Infof("skipping application '%s' source index %d of type '%s' because it's not a supported source type", app.GetName(), sourceIndex, GetSourceTypes(app.Status)[sourceIndex])
continue
}

logCtx.Tracef("processing application '%s' source index %s of type '%s'", app.GetName(), sourceIndex, GetSourceTypes(app.Status)[sourceIndex])
logCtx.Tracef("processing application '%s' source index %d of type '%s'", app.GetName(), sourceIndex, GetSourceTypes(app.Status)[sourceIndex])
imageList := parseImageList(annotations)
appImages := ApplicationImages{}
appImages.Application = app
Expand Down Expand Up @@ -580,8 +580,5 @@ func GetSourceTypes(status v1alpha1.ApplicationStatus) []v1alpha1.ApplicationSou
if HasMultipleSourceTypes(status) {
return status.SourceTypes
}
if &status.SourceType != nil {
return []v1alpha1.ApplicationSourceType{status.SourceType}
}
return []v1alpha1.ApplicationSourceType{}
return []v1alpha1.ApplicationSourceType{status.SourceType}
}
2 changes: 1 addition & 1 deletion pkg/argocd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func getWriteBackConfig(app *v1alpha1.Application, kubeClient *kube.KubernetesCl
wbc.KustomizeBases[i] = ""
}
}
if credErrors := parseGitConfig(app, kubeClient, wbc, creds); credErrors != nil && len(credErrors) > 0 {
if credErrors := parseGitConfig(app, kubeClient, wbc, creds); len(credErrors) > 0 {
return nil, fmt.Errorf("Errors parsing git credentials: %s", method)
}
default:
Expand Down

0 comments on commit 5a8d3b9

Please sign in to comment.