Skip to content

Commit 5a8d3b9

Browse files
author
Casey Morton
committed
Fixed lint issues
Signed-off-by: Casey Morton <cmorton@exiger.com>
1 parent dc3eb82 commit 5a8d3b9

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

pkg/argocd/argocd.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ func FilterApplicationsForUpdate(apps []v1alpha1.Application, patterns []string,
195195
logCtx.Debugf("Skipping app '%s' because it does not carry requested label", app.GetName())
196196
continue
197197
}
198-
for sourceIndex, _ := range getApplicationTypes(&app) {
198+
for sourceIndex := range getApplicationTypes(&app) {
199199
// Check for valid application type
200200
if !IsValidApplicationTypeForSource(&app, sourceIndex) {
201201
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])
202202
continue
203203
}
204204

205-
logCtx.Tracef("processing application '%s' source index %s of type '%s'", app.GetName(), sourceIndex, GetSourceTypes(app.Status)[sourceIndex])
205+
logCtx.Tracef("processing application '%s' source index %d of type '%s'", app.GetName(), sourceIndex, GetSourceTypes(app.Status)[sourceIndex])
206206
imageList := parseImageList(annotations)
207207
appImages := ApplicationImages{}
208208
appImages.Application = app
@@ -580,8 +580,5 @@ func GetSourceTypes(status v1alpha1.ApplicationStatus) []v1alpha1.ApplicationSou
580580
if HasMultipleSourceTypes(status) {
581581
return status.SourceTypes
582582
}
583-
if &status.SourceType != nil {
584-
return []v1alpha1.ApplicationSourceType{status.SourceType}
585-
}
586-
return []v1alpha1.ApplicationSourceType{}
583+
return []v1alpha1.ApplicationSourceType{status.SourceType}
587584
}

pkg/argocd/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ func getWriteBackConfig(app *v1alpha1.Application, kubeClient *kube.KubernetesCl
538538
wbc.KustomizeBases[i] = ""
539539
}
540540
}
541-
if credErrors := parseGitConfig(app, kubeClient, wbc, creds); credErrors != nil && len(credErrors) > 0 {
541+
if credErrors := parseGitConfig(app, kubeClient, wbc, creds); len(credErrors) > 0 {
542542
return nil, fmt.Errorf("Errors parsing git credentials: %s", method)
543543
}
544544
default:

0 commit comments

Comments
 (0)